private static int getErrorPosition(int index, String source) {
		int ws = 0;
		int wc = 0;
		for (int i = 0; wc < index; i++) {
			char c = source.charAt(i);
			if ("\t".equals(Character.toString(c)) || "\n".equals(Character.toString(c))) {
				ws++;
			}
			if (!"\t".equals(Character.toString(c)) && !"\n".equals(Character.toString(c))) {
				wc++;
			}
		}

		return wc + ws;
	}