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,4 +1,4 @@
import { lexer, splitSql, cleanSql } from '../../src';
import { lexer, splitSql, cleanSql } from '../../src/utils';
import { TokenType } from '../../src/utils/token';
describe('utils', () => {
@ -46,7 +46,6 @@ describe('utils', () => {
WHERE year = 2018;
SELECT * FROM table;`;
const result = splitSql(sql);
console.log(JSON.stringify(result));
expect(result.length).toEqual(2);
});
@ -68,7 +67,7 @@ describe('utils', () => {
const comments = result.find((token) =>
token.type === TokenType.Comment,
);
expect(comments.value).toEqual(expected);
expect(comments?.value).toEqual(expected);
});
test('cleanSql', () => {
const sql = `-- a ;