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

View File

@ -1,16 +0,0 @@
const Lexer = require('antlr4').Lexer;
function PlSqlBaseLexer(...args) {
Lexer.call(this, ...args);
return this;
}
PlSqlBaseLexer.prototype = Object.create(Lexer.prototype);
PlSqlBaseLexer.prototype.constructor = PlSqlBaseLexer;
PlSqlBaseLexer.prototype.IsNewlineAtPos = function(pos) {
const la = this._input.LA(pos);
return la == -1 || la == '\n';
};
exports.PlSqlBaseLexer = PlSqlBaseLexer;

View File

@ -1,27 +0,0 @@
const Parser = require('antlr4').Parser;
function PlSqlBaseParser(...args) {
Parser.call(this, ...args);
this._isVersion10 = false;
this._isVersion12 = true;
return this;
}
PlSqlBaseParser.prototype = Object.create(Parser.prototype);
PlSqlBaseParser.prototype.constructor = PlSqlBaseParser;
PlSqlBaseParser.prototype.isVersion10 = function() {
return this._isVersion10;
};
PlSqlBaseParser.prototype.isVersion12 = function() {
return this._isVersion12;
};
PlSqlBaseParser.prototype.setVersion10 = function(value) {
this._isVersion10 = value;
};
PlSqlBaseParser.prototype.setVersion12 = function(value) {
this._isVersion12 = value;
};
exports.PlSqlBaseParser = PlSqlBaseParser;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

16230
src/lib/plsql/PlSqlLexer.ts Normal file

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 one or more lines are too long

193036
src/lib/plsql/PlSqlParser.ts Normal file

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

View File

@ -0,0 +1,9 @@
import { Lexer } from "antlr4";
export default class PlSqlBaseLexer extends Lexer {
IsNewlineAtPos(pos: number): boolean {
const la = this._input.LA(pos);
return la == -1;
}
}

View File

@ -0,0 +1,20 @@
import { Parser } from 'antlr4';
export default class PlSqlBaseParser extends Parser {
private _isVersion10: boolean = false;
private _isVersion12: boolean = true;
public isVersion10(): boolean {
return this._isVersion10;
}
public isVersion12(): boolean {
return this._isVersion12;
}
public setVersion10(value: boolean): void {
this._isVersion10 = value;
}
public setVersion12(value: boolean): void {
this._isVersion12 = value;
}
}