feat: upgrade antlr4 to 4.12.0 (#88)
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
1638
src/lib/spark/SparkSqlLexer.ts
Normal file
1638
src/lib/spark/SparkSqlLexer.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3303
src/lib/spark/SparkSqlListener.ts
Normal file
3303
src/lib/spark/SparkSqlListener.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
27201
src/lib/spark/SparkSqlParser.ts
Normal file
27201
src/lib/spark/SparkSqlParser.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2068
src/lib/spark/SparkSqlVisitor.ts
Normal file
2068
src/lib/spark/SparkSqlVisitor.ts
Normal file
File diff suppressed because it is too large
Load Diff
25
src/lib/spark/base/SparkSqlBaseLexer.ts
Normal file
25
src/lib/spark/base/SparkSqlBaseLexer.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { Lexer } from "antlr4";
|
||||
|
||||
export default class SparkSqlBaseLexer extends Lexer {
|
||||
|
||||
isValidDecimal() {
|
||||
let nextChar = this.fromCodePoint(this._input.LA(1));
|
||||
return !(nextChar >= 'A' && nextChar <= 'Z' || nextChar >= '0' && nextChar <= '9' || nextChar == '_')
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be called when we see '/*' and try to match it as a bracketed comment.
|
||||
* If the next character is '+', it should be parsed as hint later, and we cannot match
|
||||
* it as a bracketed comment.
|
||||
*
|
||||
* Returns true if the next character is '+'.
|
||||
*/
|
||||
isHint() {
|
||||
let nextChar = this.fromCodePoint(this._input.LA(1));
|
||||
return nextChar == '+'
|
||||
}
|
||||
|
||||
fromCodePoint(codePoint) {
|
||||
return String.fromCodePoint(codePoint);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user