fix: trino validation (#248)

* fix: #246 program does not match standaloneClause

* test: patch unit tests
This commit is contained in:
Hayden
2024-01-16 11:14:03 +08:00
committed by GitHub
parent 30b7f27486
commit 1038a3a828
13 changed files with 3912 additions and 3697 deletions

File diff suppressed because one or more lines are too long

View File

@ -203,6 +203,7 @@ import { LogicalNotContext } from "./TrinoSqlParser";
import { LogicalBinaryContext } from "./TrinoSqlParser";
import { ProgramContext } from "./TrinoSqlParser";
import { StatementsContext } from "./TrinoSqlParser";
import { StandaloneClauseContext } from "./TrinoSqlParser";
import { SingleStatementContext } from "./TrinoSqlParser";
import { StandaloneExpressionContext } from "./TrinoSqlParser";
import { StandalonePathSpecificationContext } from "./TrinoSqlParser";
@ -2912,6 +2913,17 @@ export interface TrinoSqlListener extends ParseTreeListener {
*/
exitStatements?: (ctx: StatementsContext) => void;
/**
* Enter a parse tree produced by `TrinoSqlParser.standaloneClause`.
* @param ctx the parse tree
*/
enterStandaloneClause?: (ctx: StandaloneClauseContext) => void;
/**
* Exit a parse tree produced by `TrinoSqlParser.standaloneClause`.
* @param ctx the parse tree
*/
exitStandaloneClause?: (ctx: StandaloneClauseContext) => void;
/**
* Enter a parse tree produced by `TrinoSqlParser.singleStatement`.
* @param ctx the parse tree

File diff suppressed because one or more lines are too long

View File

@ -203,6 +203,7 @@ import { LogicalNotContext } from "./TrinoSqlParser";
import { LogicalBinaryContext } from "./TrinoSqlParser";
import { ProgramContext } from "./TrinoSqlParser";
import { StatementsContext } from "./TrinoSqlParser";
import { StandaloneClauseContext } from "./TrinoSqlParser";
import { SingleStatementContext } from "./TrinoSqlParser";
import { StandaloneExpressionContext } from "./TrinoSqlParser";
import { StandalonePathSpecificationContext } from "./TrinoSqlParser";
@ -1917,6 +1918,13 @@ export interface TrinoSqlVisitor<Result> extends ParseTreeVisitor<Result> {
*/
visitStatements?: (ctx: StatementsContext) => Result;
/**
* Visit a parse tree produced by `TrinoSqlParser.standaloneClause`.
* @param ctx the parse tree
* @return the visitor result
*/
visitStandaloneClause?: (ctx: StandaloneClauseContext) => Result;
/**
* Visit a parse tree produced by `TrinoSqlParser.singleStatement`.
* @param ctx the parse tree