diff --git a/src/parser/common/basicParser.ts b/src/parser/common/basicParser.ts index 0d609d7..d4453ac 100644 --- a/src/parser/common/basicParser.ts +++ b/src/parser/common/basicParser.ts @@ -60,7 +60,7 @@ export default abstract class BasicParser< * Create a antlr4 Lexer instance. * @param input source string */ - protected abstract createLexerFormCharStream(charStreams: CodePointCharStream): L; + protected abstract createLexerFromCharStream(charStreams: CodePointCharStream): L; /** * Create Parser by CommonTokenStream @@ -93,7 +93,7 @@ export default abstract class BasicParser< */ public createLexer(input: string, errorListener?: ErrorListener) { const charStreams = CharStreams.fromString(input.toUpperCase()); - const lexer = this.createLexerFormCharStream(charStreams); + const lexer = this.createLexerFromCharStream(charStreams); if (errorListener) { lexer.removeErrorListeners(); lexer.addErrorListener(new ParseErrorListener(errorListener)); @@ -140,7 +140,7 @@ export default abstract class BasicParser< private createParserWithCache(input: string): P { this._parseTree = null; this._charStreams = CharStreams.fromString(input.toUpperCase()); - this._lexer = this.createLexerFormCharStream(this._charStreams); + this._lexer = this.createLexerFromCharStream(this._charStreams); this._lexer.removeErrorListeners(); this._lexer.addErrorListener(new ParseErrorListener(this._errorListener)); diff --git a/src/parser/flinksql.ts b/src/parser/flinksql.ts index 92d5dac..14e4c59 100644 --- a/src/parser/flinksql.ts +++ b/src/parser/flinksql.ts @@ -11,7 +11,7 @@ import { SyntaxContextType, Suggestions, SyntaxSuggestion } from './common/basic import BasicParser from './common/basicParser'; export default class FlinkSQL extends BasicParser { - protected createLexerFormCharStream(charStreams) { + protected createLexerFromCharStream(charStreams) { const lexer = new FlinkSqlLexer(charStreams); return lexer; } diff --git a/src/parser/hive.ts b/src/parser/hive.ts index cffbc98..b1475b3 100644 --- a/src/parser/hive.ts +++ b/src/parser/hive.ts @@ -7,7 +7,7 @@ import { HiveSqlParserListener } from '../lib/hive/HiveSqlParserListener'; import { SyntaxContextType, Suggestions, SyntaxSuggestion } from './common/basic-parser-types'; export default class HiveSQL extends BasicParser { - protected createLexerFormCharStream(charStreams) { + protected createLexerFromCharStream(charStreams) { const lexer = new HiveSqlLexer(charStreams); return lexer; } diff --git a/src/parser/impala.ts b/src/parser/impala.ts index c11ab26..b4167d2 100644 --- a/src/parser/impala.ts +++ b/src/parser/impala.ts @@ -15,7 +15,7 @@ export default class ImpalaSQL extends BasicParser< ProgramContext, ImpalaSqlParser > { - protected createLexerFormCharStream(charStreams) { + protected createLexerFromCharStream(charStreams) { const lexer = new ImpalaSqlLexer(charStreams); return lexer; } diff --git a/src/parser/mysql.ts b/src/parser/mysql.ts index 15138e4..8292e1a 100644 --- a/src/parser/mysql.ts +++ b/src/parser/mysql.ts @@ -7,7 +7,7 @@ import { Suggestions, SyntaxContextType, SyntaxSuggestion } from './common/basic import { MySqlParserListener } from '../lib/mysql/MySqlParserListener'; export default class MySQL extends BasicParser { - protected createLexerFormCharStream(charStreams): MySqlLexer { + protected createLexerFromCharStream(charStreams): MySqlLexer { const lexer = new MySqlLexer(charStreams); return lexer; } diff --git a/src/parser/pgsql.ts b/src/parser/pgsql.ts index af58eaa..650df01 100644 --- a/src/parser/pgsql.ts +++ b/src/parser/pgsql.ts @@ -11,7 +11,7 @@ export default class PostgresSQL extends BasicParser< ProgramContext, PostgreSQLParser > { - protected createLexerFormCharStream(charStreams) { + protected createLexerFromCharStream(charStreams) { const lexer = new PostgreSQLLexer(charStreams); return lexer; } diff --git a/src/parser/plsql.ts b/src/parser/plsql.ts index 0ac36c1..9541e38 100644 --- a/src/parser/plsql.ts +++ b/src/parser/plsql.ts @@ -6,7 +6,7 @@ import BasicParser from './common/basicParser'; import { Suggestions } from './common/basic-parser-types'; export default class PLSQL extends BasicParser { - protected createLexerFormCharStream(charStreams) { + protected createLexerFromCharStream(charStreams) { const lexer = new PlSqlLexer(charStreams); return lexer; } diff --git a/src/parser/spark.ts b/src/parser/spark.ts index 98df285..17d0ed3 100644 --- a/src/parser/spark.ts +++ b/src/parser/spark.ts @@ -11,7 +11,7 @@ import { Suggestions, SyntaxContextType, SyntaxSuggestion } from './common/basic import { SparkSqlParserListener } from '../lib/spark/SparkSqlParserListener'; export default class SparkSQL extends BasicParser { - protected createLexerFormCharStream(charStreams) { + protected createLexerFromCharStream(charStreams) { const lexer = new SparkSqlLexer(charStreams); return lexer; } diff --git a/src/parser/trinosql.ts b/src/parser/trinosql.ts index 85c4f24..ad5dd7e 100644 --- a/src/parser/trinosql.ts +++ b/src/parser/trinosql.ts @@ -11,7 +11,7 @@ import BasicParser from './common/basicParser'; import { Suggestions, SyntaxContextType, SyntaxSuggestion } from './common/basic-parser-types'; export default class TrinoSQL extends BasicParser { - protected createLexerFormCharStream(charStreams) { + protected createLexerFromCharStream(charStreams) { const lexer = new TrinoSqlLexer(charStreams); return lexer; }