@Test public void lineAndColumnAt() { assertLineAndColumn( "", 0, 1, 1); assertLineAndColumn( "abc", 0, 1, 1); assertLineAndColumn( "abc", 1, 1, 2); assertLineAndColumn( "abc", 2, 1, 3); assertLineAndColumn( "\n_", 1, 2, 1); assertLineAndColumn( "\r_", 1, 2, 1); assertLineAndColumn( "\r\n_", 2, 2, 1); assertLineAndColumn( "\r", 1, 2, 1); }
public int[] lineAndColumnAt(int index) { int[] result = new int[2]; result[0] = lineAt(index); result[1] = index - lineStartIndex(result[0]) + 1; return result; }
Input { public int[] lineAndColumnAt(int index) { int[] result = new int[2]; result[0] = lineAt(index); result[1] = index - lineStartIndex(result[0]) + 1; return result; } }
Input { public int[] lineAndColumnAt(int index) { int[] result = new int[2]; result[0] = lineAt(index); result[1] = index - lineStartIndex(result[0]) + 1; return result; } Input(char[] input);  Input(char[] input, URI uri); }
Input { public int[] lineAndColumnAt(int index) { int[] result = new int[2]; result[0] = lineAt(index); result[1] = index - lineStartIndex(result[0]) + 1; return result; } Input(char[] input);  Input(char[] input, URI uri); char[] input(); URI uri(); String substring(int from, int to); int[] lineAndColumnAt(int index); }
Input { public int[] lineAndColumnAt(int index) { int[] result = new int[2]; result[0] = lineAt(index); result[1] = index - lineStartIndex(result[0]) + 1; return result; } Input(char[] input);  Input(char[] input, URI uri); char[] input(); URI uri(); String substring(int from, int to); int[] lineAndColumnAt(int index);  }