dt-sql-parser 4.0.0-ng.2 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -112
- package/dist/index.d.ts +7 -9
- package/dist/index.js +4 -7
- package/dist/lib/SQLParserBase.d.ts +8 -0
- package/dist/lib/SQLParserBase.js +14 -0
- package/dist/lib/{flinksql → flink}/FlinkSqlLexer.d.ts +2 -2
- package/dist/lib/{flinksql → flink}/FlinkSqlLexer.js +2 -1
- package/dist/lib/{flinksql → flink}/FlinkSqlParser.d.ts +5 -11
- package/dist/lib/{flinksql → flink}/FlinkSqlParser.js +2065 -2054
- package/dist/lib/{flinksql → flink}/FlinkSqlParserListener.d.ts +0 -13
- package/dist/lib/{flinksql → flink}/FlinkSqlParserListener.js +1 -1
- package/dist/lib/{flinksql → flink}/FlinkSqlParserVisitor.d.ts +0 -8
- package/dist/lib/{flinksql → flink}/FlinkSqlParserVisitor.js +2 -1
- package/dist/lib/hive/HiveSqlLexer.d.ts +258 -257
- package/dist/lib/hive/HiveSqlLexer.js +1794 -1786
- package/dist/lib/hive/HiveSqlParser.d.ts +1266 -3176
- package/dist/lib/hive/HiveSqlParser.js +23046 -33454
- package/dist/lib/hive/HiveSqlParserListener.d.ts +141 -2036
- package/dist/lib/hive/HiveSqlParserVisitor.d.ts +151 -1358
- package/dist/lib/hive/HiveSqlParserVisitor.js +1 -0
- package/dist/lib/impala/ImpalaSqlLexer.d.ts +170 -154
- package/dist/lib/impala/ImpalaSqlLexer.js +1179 -1099
- package/dist/lib/impala/ImpalaSqlParser.d.ts +282 -240
- package/dist/lib/impala/ImpalaSqlParser.js +3881 -3744
- package/dist/lib/impala/ImpalaSqlParserListener.d.ts +22 -11
- package/dist/lib/impala/ImpalaSqlParserVisitor.d.ts +14 -7
- package/dist/lib/impala/ImpalaSqlParserVisitor.js +1 -0
- package/dist/lib/index.d.ts +6 -8
- package/dist/lib/index.js +6 -8
- package/dist/lib/mysql/MySqlLexer.d.ts +2 -2
- package/dist/lib/mysql/MySqlLexer.js +1 -0
- package/dist/lib/mysql/MySqlParser.d.ts +347 -418
- package/dist/lib/mysql/MySqlParser.js +10484 -11099
- package/dist/lib/mysql/MySqlParserListener.d.ts +41 -126
- package/dist/lib/mysql/MySqlParserVisitor.d.ts +23 -76
- package/dist/lib/mysql/MySqlParserVisitor.js +1 -0
- package/dist/lib/{pgsql/PostgreSQLLexer.d.ts → postgresql/PostgreSqlLexer.d.ts} +3 -3
- package/dist/lib/{pgsql/PostgreSQLLexer.js → postgresql/PostgreSqlLexer.js} +618 -617
- package/dist/lib/{pgsql/PostgreSQLParser.d.ts → postgresql/PostgreSqlParser.d.ts} +3598 -3484
- package/dist/lib/{pgsql/PostgreSQLParser.js → postgresql/PostgreSqlParser.js} +41502 -42831
- package/dist/lib/{pgsql/PostgreSQLParserListener.d.ts → postgresql/PostgreSqlParserListener.d.ts} +2797 -2730
- package/dist/lib/{pgsql/PostgreSQLParserListener.js → postgresql/PostgreSqlParserListener.js} +3 -3
- package/dist/lib/{pgsql/PostgreSQLParserVisitor.d.ts → postgresql/PostgreSqlParserVisitor.d.ts} +1845 -1810
- package/dist/lib/{pgsql/PostgreSQLParserVisitor.js → postgresql/PostgreSqlParserVisitor.js} +4 -3
- package/dist/lib/spark/SparkSqlLexer.d.ts +305 -298
- package/dist/lib/spark/SparkSqlLexer.js +1777 -1735
- package/dist/lib/spark/SparkSqlParser.d.ts +1764 -669
- package/dist/lib/spark/SparkSqlParser.js +15460 -10769
- package/dist/lib/spark/SparkSqlParserListener.d.ts +1285 -35
- package/dist/lib/spark/SparkSqlParserVisitor.d.ts +790 -21
- package/dist/lib/spark/SparkSqlParserVisitor.js +1 -0
- package/dist/lib/{trinosql → trino}/TrinoSqlLexer.d.ts +2 -2
- package/dist/lib/{trinosql → trino}/TrinoSqlLexer.js +2 -1
- package/dist/lib/{trinosql → trino}/TrinoSqlListener.d.ts +7 -5
- package/dist/lib/{trinosql → trino}/TrinoSqlListener.js +1 -1
- package/dist/lib/{trinosql → trino}/TrinoSqlParser.d.ts +11 -5
- package/dist/lib/{trinosql → trino}/TrinoSqlParser.js +360 -320
- package/dist/lib/{trinosql → trino}/TrinoSqlVisitor.d.ts +4 -3
- package/dist/lib/{trinosql → trino}/TrinoSqlVisitor.js +2 -1
- package/dist/parser/common/{basicParser.d.ts → basicSQL.d.ts} +22 -19
- package/dist/parser/common/{basicParser.js → basicSQL.js} +52 -34
- package/dist/parser/common/entityCollector.d.ts +78 -0
- package/dist/parser/common/entityCollector.js +191 -0
- package/dist/parser/common/{utils/findCaretTokenIndex.d.ts → findCaretTokenIndex.d.ts} +2 -2
- package/dist/parser/common/{utils/findCaretTokenIndex.js → findCaretTokenIndex.js} +3 -2
- package/dist/parser/common/parseErrorListener.d.ts +6 -6
- package/dist/parser/common/parseErrorListener.js +1 -1
- package/dist/parser/common/simpleStack.d.ts +10 -0
- package/dist/parser/common/simpleStack.js +23 -0
- package/dist/parser/common/splitListener.d.ts +8 -0
- package/dist/parser/common/splitListener.js +12 -0
- package/dist/parser/common/textAndWord.d.ts +52 -0
- package/dist/parser/common/textAndWord.js +58 -0
- package/dist/parser/common/{basic-parser-types.d.ts → types.d.ts} +4 -31
- package/dist/parser/common/types.js +34 -0
- package/dist/parser/flink/flinkEntityCollector.d.ts +33 -0
- package/dist/parser/flink/flinkEntityCollector.js +84 -0
- package/dist/parser/flink/flinkSplitListener.d.ts +6 -0
- package/dist/parser/flink/flinkSplitListener.js +6 -0
- package/dist/parser/flink/index.d.ts +17 -0
- package/dist/parser/{flinksql.js → flink/index.js} +26 -37
- package/dist/parser/hive/hiveEntityCollector.d.ts +35 -0
- package/dist/parser/hive/hiveEntityCollector.js +90 -0
- package/dist/parser/hive/hiveSplitListener.d.ts +6 -0
- package/dist/parser/hive/hiveSplitListener.js +6 -0
- package/dist/parser/hive/index.d.ts +17 -0
- package/dist/parser/{hive.js → hive/index.js} +24 -34
- package/dist/parser/impala/impalaEntityCollector.d.ts +35 -0
- package/dist/parser/impala/impalaEntityCollector.js +90 -0
- package/dist/parser/impala/impalaSplitListener.d.ts +6 -0
- package/dist/parser/impala/impalaSplitListener.js +6 -0
- package/dist/parser/impala/index.d.ts +17 -0
- package/dist/parser/{impala.js → impala/index.js} +24 -34
- package/dist/parser/index.d.ts +7 -8
- package/dist/parser/index.js +7 -8
- package/dist/parser/mysql/index.d.ts +17 -0
- package/dist/parser/{mysql.js → mysql/index.js} +24 -34
- package/dist/parser/mysql/mysqlEntityCollector.d.ts +37 -0
- package/dist/parser/mysql/mysqlEntityCollector.js +96 -0
- package/dist/parser/mysql/mysqlSplitListener.d.ts +6 -0
- package/dist/parser/mysql/mysqlSplitListener.js +6 -0
- package/dist/parser/postgresql/index.d.ts +17 -0
- package/dist/parser/postgresql/index.js +130 -0
- package/dist/parser/postgresql/postgreEntityCollector.d.ts +37 -0
- package/dist/parser/postgresql/postgreEntityCollector.js +96 -0
- package/dist/parser/postgresql/postgreSplitListener.d.ts +6 -0
- package/dist/parser/postgresql/postgreSplitListener.js +6 -0
- package/dist/parser/spark/index.d.ts +17 -0
- package/dist/parser/{spark.js → spark/index.js} +29 -40
- package/dist/parser/spark/sparkEntityCollector.d.ts +37 -0
- package/dist/parser/spark/sparkEntityCollector.js +96 -0
- package/dist/parser/spark/sparkSplitListener.d.ts +6 -0
- package/dist/parser/spark/sparkSplitListener.js +6 -0
- package/dist/parser/trino/index.d.ts +17 -0
- package/dist/parser/{trinosql.js → trino/index.js} +25 -36
- package/dist/parser/trino/trinoEntityCollector.d.ts +30 -0
- package/dist/parser/trino/trinoEntityCollector.js +75 -0
- package/dist/parser/trino/trinoSplitListener.d.ts +6 -0
- package/dist/parser/trino/trinoSplitListener.js +6 -0
- package/package.json +1 -1
- package/dist/lib/plsql/PlSqlBaseLexer.d.ts +0 -5
- package/dist/lib/plsql/PlSqlBaseLexer.js +0 -7
- package/dist/lib/plsql/PlSqlBaseParser.d.ts +0 -10
- package/dist/lib/plsql/PlSqlBaseParser.js +0 -22
- package/dist/lib/plsql/PlSqlLexer.d.ts +0 -2381
- package/dist/lib/plsql/PlSqlLexer.js +0 -16440
- package/dist/lib/plsql/PlSqlParser.d.ts +0 -17080
- package/dist/lib/plsql/PlSqlParser.js +0 -184484
- package/dist/lib/plsql/PlSqlParserListener.d.ts +0 -8003
- package/dist/lib/plsql/PlSqlParserListener.js +0 -11
- package/dist/lib/plsql/PlSqlParserVisitor.d.ts +0 -5095
- package/dist/lib/plsql/PlSqlParserVisitor.js +0 -11
- package/dist/parser/common/basic-parser-types.js +0 -34
- package/dist/parser/flinksql.d.ts +0 -23
- package/dist/parser/hive.d.ts +0 -23
- package/dist/parser/impala.d.ts +0 -23
- package/dist/parser/mysql.d.ts +0 -23
- package/dist/parser/pgsql.d.ts +0 -23
- package/dist/parser/pgsql.js +0 -140
- package/dist/parser/plsql.d.ts +0 -13
- package/dist/parser/plsql.js +0 -25
- package/dist/parser/spark.d.ts +0 -23
- package/dist/parser/trinosql.d.ts +0 -23
- package/dist/utils/index.d.ts +0 -19
- package/dist/utils/index.js +0 -170
- package/dist/utils/token.d.ts +0 -59
- package/dist/utils/token.js +0 -48
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Generated from dt-sql-parser/src/grammar/plsql/PlSqlParser.g4 by ANTLR 4.13.1
|
|
2
|
-
import { AbstractParseTreeVisitor } from "antlr4ng";
|
|
3
|
-
/**
|
|
4
|
-
* This interface defines a complete generic visitor for a parse tree produced
|
|
5
|
-
* by `PlSqlParser`.
|
|
6
|
-
*
|
|
7
|
-
* @param <Result> The return type of the visit operation. Use `void` for
|
|
8
|
-
* operations with no return type.
|
|
9
|
-
*/
|
|
10
|
-
export class PlSqlParserVisitor extends AbstractParseTreeVisitor {
|
|
11
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Syntax context type at caret position
|
|
3
|
-
*/
|
|
4
|
-
export var SyntaxContextType;
|
|
5
|
-
(function (SyntaxContextType) {
|
|
6
|
-
/** catalog name */
|
|
7
|
-
SyntaxContextType["CATALOG"] = "catalog";
|
|
8
|
-
/** catalog name that will be created */
|
|
9
|
-
SyntaxContextType["CATALOG_CREATE"] = "catalogCreate";
|
|
10
|
-
/** database name path, such as catalog.db */
|
|
11
|
-
SyntaxContextType["DATABASE"] = "database";
|
|
12
|
-
/** database name path that will be created */
|
|
13
|
-
SyntaxContextType["DATABASE_CREATE"] = "databaseCreate";
|
|
14
|
-
/** table name path, such as catalog.db.tb */
|
|
15
|
-
SyntaxContextType["TABLE"] = "table";
|
|
16
|
-
/** table name path that will be created */
|
|
17
|
-
SyntaxContextType["TABLE_CREATE"] = "tableCreate";
|
|
18
|
-
/** view name path, such as db.tb.view */
|
|
19
|
-
SyntaxContextType["VIEW"] = "view";
|
|
20
|
-
/** view name path that will be created */
|
|
21
|
-
SyntaxContextType["VIEW_CREATE"] = "viewCreate";
|
|
22
|
-
/** function name */
|
|
23
|
-
SyntaxContextType["FUNCTION"] = "function";
|
|
24
|
-
/** function name that will be created */
|
|
25
|
-
SyntaxContextType["FUNCTION_CREATE"] = "functionCreate";
|
|
26
|
-
/** procedure name */
|
|
27
|
-
SyntaxContextType["PROCEDURE"] = "procedure";
|
|
28
|
-
/** procedure name that will be created */
|
|
29
|
-
SyntaxContextType["PROCEDURE_CREATE"] = "procedureCreate";
|
|
30
|
-
/** column name */
|
|
31
|
-
SyntaxContextType["COLUMN"] = "column";
|
|
32
|
-
/** column name that will be created */
|
|
33
|
-
SyntaxContextType["COLUMN_CREATE"] = "columnCreate";
|
|
34
|
-
})(SyntaxContextType || (SyntaxContextType = {}));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { FlinkSqlLexer } from '../lib/flinksql/FlinkSqlLexer';
|
|
4
|
-
import { FlinkSqlParser, ProgramContext, SingleStatementContext } from '../lib/flinksql/FlinkSqlParser';
|
|
5
|
-
import { FlinkSqlParserListener } from '../lib/flinksql/FlinkSqlParserListener';
|
|
6
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
7
|
-
import BasicParser from './common/basicParser';
|
|
8
|
-
export default class FlinkSQL extends BasicParser<FlinkSqlLexer, ProgramContext, FlinkSqlParser> {
|
|
9
|
-
protected createLexerFromCharStream(charStreams: any): FlinkSqlLexer;
|
|
10
|
-
protected createParserFromTokenStream(tokenStream: any): FlinkSqlParser;
|
|
11
|
-
protected preferredRules: Set<number>;
|
|
12
|
-
protected get splitListener(): FlinkSqlSplitListener;
|
|
13
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
14
|
-
}
|
|
15
|
-
export declare class FlinkSqlSplitListener implements FlinkSqlParserListener {
|
|
16
|
-
private _statementsContext;
|
|
17
|
-
exitSingleStatement: (ctx: SingleStatementContext) => void;
|
|
18
|
-
visitTerminal(): void;
|
|
19
|
-
visitErrorNode(): void;
|
|
20
|
-
enterEveryRule(): void;
|
|
21
|
-
exitEveryRule(): void;
|
|
22
|
-
get statementsContext(): SingleStatementContext[];
|
|
23
|
-
}
|
package/dist/parser/hive.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { HiveSqlLexer } from '../lib/hive/HiveSqlLexer';
|
|
4
|
-
import { HiveSqlParser, ProgramContext, StatementContext } from '../lib/hive/HiveSqlParser';
|
|
5
|
-
import BasicParser from './common/basicParser';
|
|
6
|
-
import { HiveSqlParserListener } from '../lib/hive/HiveSqlParserListener';
|
|
7
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
8
|
-
export default class HiveSQL extends BasicParser<HiveSqlLexer, ProgramContext, HiveSqlParser> {
|
|
9
|
-
protected createLexerFromCharStream(charStreams: any): HiveSqlLexer;
|
|
10
|
-
protected createParserFromTokenStream(tokenStream: any): HiveSqlParser;
|
|
11
|
-
protected preferredRules: Set<number>;
|
|
12
|
-
protected get splitListener(): HiveSqlSplitListener;
|
|
13
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
14
|
-
}
|
|
15
|
-
export declare class HiveSqlSplitListener implements HiveSqlParserListener {
|
|
16
|
-
private _statementContext;
|
|
17
|
-
exitStatement: (ctx: StatementContext) => void;
|
|
18
|
-
visitTerminal(): void;
|
|
19
|
-
visitErrorNode(): void;
|
|
20
|
-
enterEveryRule(): void;
|
|
21
|
-
exitEveryRule(): void;
|
|
22
|
-
get statementsContext(): StatementContext[];
|
|
23
|
-
}
|
package/dist/parser/impala.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { ImpalaSqlLexer } from '../lib/impala/ImpalaSqlLexer';
|
|
4
|
-
import { ImpalaSqlParser, ProgramContext, SingleStatementContext } from '../lib/impala/ImpalaSqlParser';
|
|
5
|
-
import BasicParser from './common/basicParser';
|
|
6
|
-
import { ImpalaSqlParserListener } from '../lib/impala/ImpalaSqlParserListener';
|
|
7
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
8
|
-
export default class ImpalaSQL extends BasicParser<ImpalaSqlLexer, ProgramContext, ImpalaSqlParser> {
|
|
9
|
-
protected createLexerFromCharStream(charStreams: any): ImpalaSqlLexer;
|
|
10
|
-
protected createParserFromTokenStream(tokenStream: any): ImpalaSqlParser;
|
|
11
|
-
protected preferredRules: Set<number>;
|
|
12
|
-
protected get splitListener(): ImpalaSqlSplitListener;
|
|
13
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
14
|
-
}
|
|
15
|
-
export declare class ImpalaSqlSplitListener implements ImpalaSqlParserListener {
|
|
16
|
-
private _statementContext;
|
|
17
|
-
exitSingleStatement: (ctx: SingleStatementContext) => void;
|
|
18
|
-
visitTerminal(): void;
|
|
19
|
-
visitErrorNode(): void;
|
|
20
|
-
enterEveryRule(): void;
|
|
21
|
-
exitEveryRule(): void;
|
|
22
|
-
get statementsContext(): SingleStatementContext[];
|
|
23
|
-
}
|
package/dist/parser/mysql.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { MySqlLexer } from '../lib/mysql/MySqlLexer';
|
|
4
|
-
import { MySqlParser, ProgramContext, SingleStatementContext } from '../lib/mysql/MySqlParser';
|
|
5
|
-
import BasicParser from './common/basicParser';
|
|
6
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
7
|
-
import { MySqlParserListener } from '../lib/mysql/MySqlParserListener';
|
|
8
|
-
export default class MySQL extends BasicParser<MySqlLexer, ProgramContext, MySqlParser> {
|
|
9
|
-
protected createLexerFromCharStream(charStreams: any): MySqlLexer;
|
|
10
|
-
protected createParserFromTokenStream(tokenStream: any): MySqlParser;
|
|
11
|
-
protected preferredRules: Set<number>;
|
|
12
|
-
protected get splitListener(): MysqlSplitListener;
|
|
13
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
14
|
-
}
|
|
15
|
-
export declare class MysqlSplitListener implements MySqlParserListener {
|
|
16
|
-
private _statementsContext;
|
|
17
|
-
exitSingleStatement: (ctx: SingleStatementContext) => void;
|
|
18
|
-
visitTerminal(): void;
|
|
19
|
-
visitErrorNode(): void;
|
|
20
|
-
enterEveryRule(): void;
|
|
21
|
-
exitEveryRule(): void;
|
|
22
|
-
get statementsContext(): SingleStatementContext[];
|
|
23
|
-
}
|
package/dist/parser/pgsql.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { PostgreSQLLexer } from '../lib/pgsql/PostgreSQLLexer';
|
|
4
|
-
import { PostgreSQLParser, ProgramContext, SingleStmtContext } from '../lib/pgsql/PostgreSQLParser';
|
|
5
|
-
import BasicParser from './common/basicParser';
|
|
6
|
-
import { PostgreSQLParserListener } from '../lib/pgsql/PostgreSQLParserListener';
|
|
7
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
8
|
-
export default class PostgresSQL extends BasicParser<PostgreSQLLexer, ProgramContext, PostgreSQLParser> {
|
|
9
|
-
protected createLexerFromCharStream(charStreams: any): PostgreSQLLexer;
|
|
10
|
-
protected createParserFromTokenStream(tokenStream: any): PostgreSQLParser;
|
|
11
|
-
protected preferredRules: Set<number>;
|
|
12
|
-
protected get splitListener(): PgSqlSplitListener;
|
|
13
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
14
|
-
}
|
|
15
|
-
export declare class PgSqlSplitListener implements PostgreSQLParserListener {
|
|
16
|
-
private _statementsContext;
|
|
17
|
-
exitSingleStmt: (ctx: SingleStmtContext) => void;
|
|
18
|
-
visitTerminal(): void;
|
|
19
|
-
visitErrorNode(): void;
|
|
20
|
-
enterEveryRule(): void;
|
|
21
|
-
exitEveryRule(): void;
|
|
22
|
-
get statementsContext(): SingleStmtContext[];
|
|
23
|
-
}
|
package/dist/parser/pgsql.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { PostgreSQLLexer } from '../lib/pgsql/PostgreSQLLexer';
|
|
2
|
-
import { PostgreSQLParser } from '../lib/pgsql/PostgreSQLParser';
|
|
3
|
-
import BasicParser from './common/basicParser';
|
|
4
|
-
import { SyntaxContextType } from './common/basic-parser-types';
|
|
5
|
-
export default class PostgresSQL extends BasicParser {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.preferredRules = new Set([
|
|
9
|
-
PostgreSQLParser.RULE_table_name_create,
|
|
10
|
-
PostgreSQLParser.RULE_table_name,
|
|
11
|
-
PostgreSQLParser.RULE_function_name,
|
|
12
|
-
PostgreSQLParser.RULE_function_name_create,
|
|
13
|
-
PostgreSQLParser.RULE_schema_name_create,
|
|
14
|
-
PostgreSQLParser.RULE_schema_name,
|
|
15
|
-
PostgreSQLParser.RULE_view_name_create,
|
|
16
|
-
PostgreSQLParser.RULE_view_name,
|
|
17
|
-
PostgreSQLParser.RULE_database_name_create,
|
|
18
|
-
PostgreSQLParser.RULE_database_name,
|
|
19
|
-
PostgreSQLParser.RULE_procedure_name_create,
|
|
20
|
-
PostgreSQLParser.RULE_procedure_name,
|
|
21
|
-
PostgreSQLParser.RULE_column_name_create,
|
|
22
|
-
PostgreSQLParser.RULE_column_name, // column name
|
|
23
|
-
]);
|
|
24
|
-
}
|
|
25
|
-
createLexerFromCharStream(charStreams) {
|
|
26
|
-
const lexer = new PostgreSQLLexer(charStreams);
|
|
27
|
-
return lexer;
|
|
28
|
-
}
|
|
29
|
-
createParserFromTokenStream(tokenStream) {
|
|
30
|
-
return new PostgreSQLParser(tokenStream);
|
|
31
|
-
}
|
|
32
|
-
get splitListener() {
|
|
33
|
-
return new PgSqlSplitListener();
|
|
34
|
-
}
|
|
35
|
-
processCandidates(candidates, allTokens, caretTokenIndex, tokenIndexOffset) {
|
|
36
|
-
const originalSyntaxSuggestions = [];
|
|
37
|
-
const keywords = [];
|
|
38
|
-
for (let candidate of candidates.rules) {
|
|
39
|
-
const [ruleType, candidateRule] = candidate;
|
|
40
|
-
const startTokenIndex = candidateRule.startTokenIndex + tokenIndexOffset;
|
|
41
|
-
const tokenRanges = allTokens.slice(startTokenIndex, caretTokenIndex + tokenIndexOffset + 1);
|
|
42
|
-
let syntaxContextType;
|
|
43
|
-
switch (ruleType) {
|
|
44
|
-
case PostgreSQLParser.RULE_table_name_create: {
|
|
45
|
-
syntaxContextType = SyntaxContextType.TABLE_CREATE;
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
case PostgreSQLParser.RULE_table_name: {
|
|
49
|
-
syntaxContextType = SyntaxContextType.TABLE;
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
case PostgreSQLParser.RULE_function_name_create: {
|
|
53
|
-
syntaxContextType = SyntaxContextType.FUNCTION_CREATE;
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
case PostgreSQLParser.RULE_function_name: {
|
|
57
|
-
syntaxContextType = SyntaxContextType.FUNCTION;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
case PostgreSQLParser.RULE_schema_name_create: {
|
|
61
|
-
syntaxContextType = SyntaxContextType.DATABASE_CREATE;
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
case PostgreSQLParser.RULE_schema_name: {
|
|
65
|
-
syntaxContextType = SyntaxContextType.DATABASE;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
case PostgreSQLParser.RULE_view_name_create: {
|
|
69
|
-
syntaxContextType = SyntaxContextType.VIEW_CREATE;
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
case PostgreSQLParser.RULE_view_name: {
|
|
73
|
-
syntaxContextType = SyntaxContextType.VIEW;
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
case PostgreSQLParser.RULE_database_name_create: {
|
|
77
|
-
syntaxContextType = SyntaxContextType.DATABASE_CREATE;
|
|
78
|
-
break;
|
|
79
|
-
}
|
|
80
|
-
case PostgreSQLParser.RULE_database_name: {
|
|
81
|
-
syntaxContextType = SyntaxContextType.DATABASE;
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
case PostgreSQLParser.RULE_procedure_name_create: {
|
|
85
|
-
syntaxContextType = SyntaxContextType.PROCEDURE_CREATE;
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
case PostgreSQLParser.RULE_procedure_name: {
|
|
89
|
-
syntaxContextType = SyntaxContextType.PROCEDURE;
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
case PostgreSQLParser.RULE_column_name_create: {
|
|
93
|
-
syntaxContextType = SyntaxContextType.COLUMN_CREATE;
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
case PostgreSQLParser.RULE_column_name: {
|
|
97
|
-
syntaxContextType = SyntaxContextType.COLUMN;
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
default:
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
if (syntaxContextType) {
|
|
104
|
-
originalSyntaxSuggestions.push({
|
|
105
|
-
syntaxContextType,
|
|
106
|
-
wordRanges: tokenRanges,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
for (let candidate of candidates.tokens) {
|
|
111
|
-
const symbolicName = this._parser.vocabulary.getSymbolicName(candidate[0]);
|
|
112
|
-
const displayName = this._parser.vocabulary.getDisplayName(candidate[0]);
|
|
113
|
-
if (symbolicName && symbolicName.startsWith('KW_')) {
|
|
114
|
-
const keyword = displayName.startsWith("'") && displayName.endsWith("'")
|
|
115
|
-
? displayName.slice(1, -1)
|
|
116
|
-
: displayName;
|
|
117
|
-
keywords.push(keyword);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return {
|
|
121
|
-
syntax: originalSyntaxSuggestions,
|
|
122
|
-
keywords,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
export class PgSqlSplitListener {
|
|
127
|
-
constructor() {
|
|
128
|
-
this._statementsContext = [];
|
|
129
|
-
this.exitSingleStmt = (ctx) => {
|
|
130
|
-
this._statementsContext.push(ctx);
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
visitTerminal() { }
|
|
134
|
-
visitErrorNode() { }
|
|
135
|
-
enterEveryRule() { }
|
|
136
|
-
exitEveryRule() { }
|
|
137
|
-
get statementsContext() {
|
|
138
|
-
return this._statementsContext;
|
|
139
|
-
}
|
|
140
|
-
}
|
package/dist/parser/plsql.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { PlSqlLexer } from '../lib/plsql/PlSqlLexer';
|
|
4
|
-
import { PlSqlParser, ProgramContext } from '../lib/plsql/PlSqlParser';
|
|
5
|
-
import BasicParser from './common/basicParser';
|
|
6
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
7
|
-
export default class PLSQL extends BasicParser<PlSqlLexer, ProgramContext, PlSqlParser> {
|
|
8
|
-
protected createLexerFromCharStream(charStreams: any): PlSqlLexer;
|
|
9
|
-
protected createParserFromTokenStream(tokenStream: any): PlSqlParser;
|
|
10
|
-
protected preferredRules: Set<number>;
|
|
11
|
-
protected get splitListener(): any;
|
|
12
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number): Suggestions<Token>;
|
|
13
|
-
}
|
package/dist/parser/plsql.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PlSqlLexer } from '../lib/plsql/PlSqlLexer';
|
|
2
|
-
import { PlSqlParser } from '../lib/plsql/PlSqlParser';
|
|
3
|
-
import BasicParser from './common/basicParser';
|
|
4
|
-
export default class PLSQL extends BasicParser {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.preferredRules = new Set();
|
|
8
|
-
}
|
|
9
|
-
createLexerFromCharStream(charStreams) {
|
|
10
|
-
const lexer = new PlSqlLexer(charStreams);
|
|
11
|
-
return lexer;
|
|
12
|
-
}
|
|
13
|
-
createParserFromTokenStream(tokenStream) {
|
|
14
|
-
return new PlSqlParser(tokenStream);
|
|
15
|
-
}
|
|
16
|
-
get splitListener() {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
processCandidates(candidates, allTokens, caretTokenIndex) {
|
|
20
|
-
return {
|
|
21
|
-
syntax: [],
|
|
22
|
-
keywords: [],
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
package/dist/parser/spark.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { SparkSqlLexer } from '../lib/spark/SparkSqlLexer';
|
|
4
|
-
import { SparkSqlParser, ProgramContext, SingleStatementContext } from '../lib/spark/SparkSqlParser';
|
|
5
|
-
import BasicParser from './common/basicParser';
|
|
6
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
7
|
-
import { SparkSqlParserListener } from '../lib/spark/SparkSqlParserListener';
|
|
8
|
-
export default class SparkSQL extends BasicParser<SparkSqlLexer, ProgramContext, SparkSqlParser> {
|
|
9
|
-
protected createLexerFromCharStream(charStreams: any): SparkSqlLexer;
|
|
10
|
-
protected createParserFromTokenStream(tokenStream: any): SparkSqlParser;
|
|
11
|
-
protected preferredRules: Set<number>;
|
|
12
|
-
protected get splitListener(): SparkSqlSplitListener;
|
|
13
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
14
|
-
}
|
|
15
|
-
export declare class SparkSqlSplitListener implements SparkSqlParserListener {
|
|
16
|
-
private _statementsContext;
|
|
17
|
-
exitSingleStatement: (ctx: SingleStatementContext) => void;
|
|
18
|
-
visitTerminal(): void;
|
|
19
|
-
visitErrorNode(): void;
|
|
20
|
-
enterEveryRule(): void;
|
|
21
|
-
exitEveryRule(): void;
|
|
22
|
-
get statementsContext(): SingleStatementContext[];
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Token } from 'antlr4ng';
|
|
2
|
-
import { CandidatesCollection } from 'antlr4-c3';
|
|
3
|
-
import { TrinoSqlLexer } from '../lib/trinosql/TrinoSqlLexer';
|
|
4
|
-
import { TrinoSqlParser, ProgramContext, SingleStatementContext } from '../lib/trinosql/TrinoSqlParser';
|
|
5
|
-
import { TrinoSqlListener } from '../lib/trinosql/TrinoSqlListener';
|
|
6
|
-
import BasicParser from './common/basicParser';
|
|
7
|
-
import { Suggestions } from './common/basic-parser-types';
|
|
8
|
-
export default class TrinoSQL extends BasicParser<TrinoSqlLexer, ProgramContext, TrinoSqlParser> {
|
|
9
|
-
protected createLexerFromCharStream(charStreams: any): TrinoSqlLexer;
|
|
10
|
-
protected createParserFromTokenStream(tokenStream: any): TrinoSqlParser;
|
|
11
|
-
protected get splitListener(): TrinoSqlSplitListener;
|
|
12
|
-
protected preferredRules: Set<number>;
|
|
13
|
-
protected processCandidates(candidates: CandidatesCollection, allTokens: Token[], caretTokenIndex: number, tokenIndexOffset: number): Suggestions<Token>;
|
|
14
|
-
}
|
|
15
|
-
export declare class TrinoSqlSplitListener implements TrinoSqlListener {
|
|
16
|
-
private _statementsContext;
|
|
17
|
-
exitSingleStatement: (ctx: SingleStatementContext) => void;
|
|
18
|
-
visitTerminal(): void;
|
|
19
|
-
visitErrorNode(): void;
|
|
20
|
-
enterEveryRule(): void;
|
|
21
|
-
exitEveryRule(): void;
|
|
22
|
-
get statementsContext(): SingleStatementContext[];
|
|
23
|
-
}
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Legacy_Token } from './token';
|
|
2
|
-
/**
|
|
3
|
-
* @param {String} sql
|
|
4
|
-
* @deprecated use parser.createLexer() instead.
|
|
5
|
-
*/
|
|
6
|
-
declare function legacy_lexer(input: string): Legacy_Token[];
|
|
7
|
-
/**
|
|
8
|
-
* split sql
|
|
9
|
-
* @param {String} sql
|
|
10
|
-
* @deprecated use parser.splitSQLByStatement() instead.
|
|
11
|
-
*/
|
|
12
|
-
declare function legacy_splitSql(sql: string): any[];
|
|
13
|
-
/**
|
|
14
|
-
* clean comment
|
|
15
|
-
* @param {String} sql
|
|
16
|
-
* @deprecated will be removed in future.
|
|
17
|
-
*/
|
|
18
|
-
declare function legacy_cleanSql(sql: string): string;
|
|
19
|
-
export { legacy_cleanSql, legacy_splitSql, legacy_lexer };
|
package/dist/utils/index.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { Legacy_TokenType, Legacy_TokenReg } from './token';
|
|
2
|
-
/**
|
|
3
|
-
* @param {String} sql
|
|
4
|
-
* @deprecated use parser.createLexer() instead.
|
|
5
|
-
*/
|
|
6
|
-
function legacy_lexer(input) {
|
|
7
|
-
let current = 0;
|
|
8
|
-
let line = 1;
|
|
9
|
-
const tokens = [];
|
|
10
|
-
const extract = (currentChar, validator, TokenType) => {
|
|
11
|
-
let value = '';
|
|
12
|
-
const start = current;
|
|
13
|
-
while (validator.test(currentChar)) {
|
|
14
|
-
value += currentChar;
|
|
15
|
-
currentChar = input[++current];
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
type: TokenType,
|
|
19
|
-
start: start,
|
|
20
|
-
end: current,
|
|
21
|
-
lineNumber: line,
|
|
22
|
-
value: value,
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
const matchFunction = () => {
|
|
26
|
-
const bracketNum = [current];
|
|
27
|
-
for (let i = current + 1; i < input.length; i++) {
|
|
28
|
-
const currentChar = input[i];
|
|
29
|
-
if (currentChar === '\n') {
|
|
30
|
-
line++;
|
|
31
|
-
}
|
|
32
|
-
if (Legacy_TokenReg.LeftSmallBracket.test(currentChar)) {
|
|
33
|
-
bracketNum.push(i);
|
|
34
|
-
}
|
|
35
|
-
if (Legacy_TokenReg.RightSmallBracket.test(currentChar)) {
|
|
36
|
-
const start = bracketNum.pop();
|
|
37
|
-
const end = i + 1;
|
|
38
|
-
if (bracketNum.length === 0) {
|
|
39
|
-
current = end;
|
|
40
|
-
tokens.push({
|
|
41
|
-
type: Legacy_TokenType.FunctionArguments,
|
|
42
|
-
value: input.slice(start, end),
|
|
43
|
-
start,
|
|
44
|
-
lineNumber: line,
|
|
45
|
-
end,
|
|
46
|
-
});
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const matchQuotation = (currentChar, validator, TokenType) => {
|
|
53
|
-
do {
|
|
54
|
-
if (currentChar === '\n') {
|
|
55
|
-
line++;
|
|
56
|
-
}
|
|
57
|
-
currentChar = input[++current];
|
|
58
|
-
} while (!validator.test(currentChar));
|
|
59
|
-
++current;
|
|
60
|
-
};
|
|
61
|
-
while (current < input.length) {
|
|
62
|
-
let char = input[current];
|
|
63
|
-
if (char === '\n') {
|
|
64
|
-
line++;
|
|
65
|
-
current++;
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
if (Legacy_TokenReg.LeftSmallBracket.test(char)) {
|
|
69
|
-
matchFunction();
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
if (Legacy_TokenReg.BackQuotation.test(char)) {
|
|
73
|
-
matchQuotation(char, Legacy_TokenReg.BackQuotation, Legacy_TokenType.BackQuotation);
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (Legacy_TokenReg.SingleQuotation.test(char)) {
|
|
77
|
-
matchQuotation(char, Legacy_TokenReg.SingleQuotation, Legacy_TokenType.SingleQuotation);
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (Legacy_TokenReg.DoubleQuotation.test(char)) {
|
|
81
|
-
matchQuotation(char, Legacy_TokenReg.DoubleQuotation, Legacy_TokenType.DoubleQuotation);
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
if (char === '-' && input[current + 1] === '-') {
|
|
85
|
-
let value = '';
|
|
86
|
-
const start = current;
|
|
87
|
-
while (char !== '\n' && current < input.length) {
|
|
88
|
-
value += char;
|
|
89
|
-
char = input[++current];
|
|
90
|
-
}
|
|
91
|
-
tokens.push({
|
|
92
|
-
type: Legacy_TokenType.Comment,
|
|
93
|
-
value,
|
|
94
|
-
start: start,
|
|
95
|
-
lineNumber: line,
|
|
96
|
-
end: current,
|
|
97
|
-
});
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
if (char === '/' && input[current + 1] === '*') {
|
|
101
|
-
let value = '';
|
|
102
|
-
const start = current;
|
|
103
|
-
const startLine = line;
|
|
104
|
-
while (!(char === '/' && input[current - 1] === '*')) {
|
|
105
|
-
if (char === '\n') {
|
|
106
|
-
line++;
|
|
107
|
-
}
|
|
108
|
-
value += char;
|
|
109
|
-
char = input[++current];
|
|
110
|
-
}
|
|
111
|
-
value += char;
|
|
112
|
-
++current;
|
|
113
|
-
tokens.push({
|
|
114
|
-
type: Legacy_TokenType.Comment,
|
|
115
|
-
value,
|
|
116
|
-
start: start,
|
|
117
|
-
lineNumber: startLine,
|
|
118
|
-
end: current,
|
|
119
|
-
});
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
if (Legacy_TokenReg.StatementTerminator.test(char)) {
|
|
123
|
-
const newToken = extract(char, Legacy_TokenReg.StatementTerminator, Legacy_TokenType.StatementTerminator);
|
|
124
|
-
tokens.push(newToken);
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
current++;
|
|
128
|
-
}
|
|
129
|
-
return tokens;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* split sql
|
|
133
|
-
* @param {String} sql
|
|
134
|
-
* @deprecated use parser.splitSQLByStatement() instead.
|
|
135
|
-
*/
|
|
136
|
-
function legacy_splitSql(sql) {
|
|
137
|
-
const tokens = legacy_lexer(sql);
|
|
138
|
-
const sqlArr = [];
|
|
139
|
-
let startIndex = 0;
|
|
140
|
-
tokens.forEach((ele) => {
|
|
141
|
-
if (ele.type === Legacy_TokenType.StatementTerminator) {
|
|
142
|
-
sqlArr.push(sql.slice(startIndex, ele.end));
|
|
143
|
-
startIndex = ele.end;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
if (startIndex < sql.length) {
|
|
147
|
-
sqlArr.push(sql.slice(startIndex));
|
|
148
|
-
}
|
|
149
|
-
return sqlArr;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* clean comment
|
|
153
|
-
* @param {String} sql
|
|
154
|
-
* @deprecated will be removed in future.
|
|
155
|
-
*/
|
|
156
|
-
function legacy_cleanSql(sql) {
|
|
157
|
-
sql = sql.trim();
|
|
158
|
-
const tokens = legacy_lexer(sql);
|
|
159
|
-
let resultSql = '';
|
|
160
|
-
let startIndex = 0;
|
|
161
|
-
tokens.forEach((ele) => {
|
|
162
|
-
if (ele.type === Legacy_TokenType.Comment) {
|
|
163
|
-
resultSql += sql.slice(startIndex, ele.start);
|
|
164
|
-
startIndex = ele.end + 1;
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
resultSql += sql.slice(startIndex);
|
|
168
|
-
return resultSql;
|
|
169
|
-
}
|
|
170
|
-
export { legacy_cleanSql, legacy_splitSql, legacy_lexer };
|
package/dist/utils/token.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated will be removed in future.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum Legacy_TokenType {
|
|
5
|
-
/**
|
|
6
|
-
* Enclosed in single/double/back quotation, `` Symbol
|
|
7
|
-
* 'abc', "abc", `abc`
|
|
8
|
-
*/
|
|
9
|
-
SingleQuotation = "SingleQuotation",
|
|
10
|
-
DoubleQuotation = "DoubleQuotation",
|
|
11
|
-
BackQuotation = "BackQuotation",
|
|
12
|
-
/**
|
|
13
|
-
* Language element type
|
|
14
|
-
*/
|
|
15
|
-
Comment = "Comment",
|
|
16
|
-
/**
|
|
17
|
-
* Statement
|
|
18
|
-
*/
|
|
19
|
-
StatementTerminator = "StatementTerminator",
|
|
20
|
-
/**
|
|
21
|
-
* Others
|
|
22
|
-
*/
|
|
23
|
-
Error = "Error",
|
|
24
|
-
/**
|
|
25
|
-
* Left small Bracket
|
|
26
|
-
*/
|
|
27
|
-
LeftSmallBracket = "LeftSmallBracket",
|
|
28
|
-
/**
|
|
29
|
-
* Left small Bracket
|
|
30
|
-
*/
|
|
31
|
-
RightSmallBracket = "RightSmallBracket",
|
|
32
|
-
Comma = "Comma",
|
|
33
|
-
FunctionArguments = "FunctionArguments"
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated will be removed in future.
|
|
37
|
-
* Token object
|
|
38
|
-
*/
|
|
39
|
-
export interface Legacy_Token {
|
|
40
|
-
type: Legacy_TokenType;
|
|
41
|
-
value: string;
|
|
42
|
-
start: number;
|
|
43
|
-
end: number;
|
|
44
|
-
lineNumber: number;
|
|
45
|
-
message?: string;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated will be removed in future.
|
|
49
|
-
* Token recognition rules
|
|
50
|
-
*/
|
|
51
|
-
export declare const Legacy_TokenReg: {
|
|
52
|
-
StatementTerminator: RegExp;
|
|
53
|
-
SingleQuotation: RegExp;
|
|
54
|
-
DoubleQuotation: RegExp;
|
|
55
|
-
BackQuotation: RegExp;
|
|
56
|
-
LeftSmallBracket: RegExp;
|
|
57
|
-
RightSmallBracket: RegExp;
|
|
58
|
-
Comma: RegExp;
|
|
59
|
-
};
|