Fix/export abstract visitor (#237)

* fix: #236 export AbstractParseTreeVisitor

* build: set isolatedModules true

* feat: import parser about from filters
This commit is contained in:
Hayden
2023-12-19 19:22:27 +08:00
committed by GitHub
parent 55a4832047
commit 8f72a5af60
162 changed files with 327 additions and 277 deletions

View File

@ -1,6 +1,5 @@
import MySQL from '../../../src/parser/mysql';
import { MysqlSplitListener } from '../../../src/parser/mysql';
import { MySqlParserListener } from '../../../src/lib/mysql/MySqlParserListener';
import { MySQL } from '../../filters';
import { MysqlSplitListener, MySqlParserListener } from '../../filters';
const validSQL1 = `INSERT INTO country_page_view
VALUES ('Chinese', 'mumiao', 18),

View File

@ -1,4 +1,4 @@
import MySQL from '../../../src/parser/mysql';
import { MySQL } from '../../filters';
describe('MySQL Lexer tests', () => {
const parser = new MySQL();

View File

@ -1,6 +1,5 @@
import MySQL from '../../../src/parser/mysql';
import { MySqlParserListener } from '../../../src/lib/mysql/MySqlParserListener';
import { ParseTreeListener } from 'antlr4ts/tree';
import { MySQL } from '../../filters';
import { MySqlParserListener, ParseTreeListener } from '../../filters';
describe('MySQL Listener Tests', () => {
const expectTableName = 'user1';

View File

@ -1,7 +1,6 @@
import fs from 'fs';
import path from 'path';
import { CaretPosition, SyntaxContextType } from '../../../../src/parser/common/basic-parser-types';
import MySQL from '../../../../src/parser/mysql';
import { MySQL, CaretPosition, SyntaxContextType } from '../../../filters';
const syntaxSql = fs.readFileSync(
path.join(__dirname, 'fixtures', 'multipleStatement.sql'),

View File

@ -1,7 +1,6 @@
import fs from 'fs';
import path from 'path';
import { CaretPosition, SyntaxContextType } from '../../../../src/parser/common/basic-parser-types';
import MySQL from '../../../../src/parser/mysql';
import { MySQL, CaretPosition, SyntaxContextType } from '../../../filters';
import { commentOtherLine } from '../../../helper';
const syntaxSql = fs.readFileSync(

View File

@ -1,7 +1,6 @@
import fs from 'fs';
import path from 'path';
import { CaretPosition } from '../../../../src/parser/common/basic-parser-types';
import MySQL from '../../../../src/parser/mysql';
import { MySQL, CaretPosition } from '../../../filters';
import { commentOtherLine } from '../../../helper';
const tokenSql = fs.readFileSync(path.join(__dirname, 'fixtures', 'tokenSuggestion.sql'), 'utf-8');

View File

@ -1,4 +1,4 @@
import MySQL from '../../../src/parser/mysql';
import { MySQL } from '../../filters';
describe('MySQL Syntax Tests', () => {
const parser = new MySQL();

View File

@ -1,4 +1,4 @@
import MySQL from '../../../../src/parser/mysql';
import { MySQL } from '../../../filters';
import { readSQL } from '../../../helper';
const parser = new MySQL();

View File

@ -1,4 +1,4 @@
import MySQL from '../../../../src/parser/mysql';
import { MySQL } from '../../../filters';
import { readSQL } from '../../../helper';
const parser = new MySQL();

View File

@ -1,4 +1,4 @@
import MySQL from '../../../../src/parser/mysql';
import { MySQL } from '../../../filters';
import { readSQL } from '../../../helper';
const parser = new MySQL();

View File

@ -1,4 +1,4 @@
import MySQL from '../../../../src/parser/mysql';
import { MySQL } from '../../../filters';
import { readSQL } from '../../../helper';
const parser = new MySQL();

View File

@ -1,6 +1,4 @@
import MySQL from '../../../src/parser/mysql';
import { MySqlParserVisitor } from '../../../src/lib/mysql/MySqlParserVisitor';
import { AbstractParseTreeVisitor } from 'antlr4ts/tree';
import { MySQL, MySqlParserVisitor, AbstractParseTreeVisitor } from '../../filters';
describe('MySQL Visitor Tests', () => {
const expectTableName = 'user1';