internal SqlParseException(ParseException ex, string source, List<Token> allTokens) { this.ex = ex; this.source = source; this.allTokens = allTokens; startLine = ex.currentToken.beginLine; endLine = ex.currentToken.endLine; startColumn = ex.currentToken.beginColumn; endColumn = ex.currentToken.endColumn; expected = BuildExpected(ex); }
private static string[] BuildExpected(ParseException exception) { var list = new List<string>(); for (int i = 0; i < exception.expectedTokenSequences.Length; i++) { for (int j = 0; j < exception.expectedTokenSequences[i].Length; j++) { list.Add(exception.tokenImage[exception.expectedTokenSequences[i][j]]); } } return list.ToArray(); }