feat: upgrade antlr4 to 4.12.0 (#88)

This commit is contained in:
Ziv
2023-05-04 10:13:05 +08:00
committed by GitHub
parent c0842b3e07
commit c1c72def30
116 changed files with 552721 additions and 609942 deletions

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View 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);
}
}