From 771b562c7893d89002b29cfeae9d2fbe0e8ee8d6 Mon Sep 17 00:00:00 2001 From: Erindcl Date: Mon, 14 Dec 2020 11:48:08 +0800 Subject: [PATCH] fix(flink): clear useless comments --- src/utils/index.ts | 7 ------- test/parser/flinksql/syntax.test.ts | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 0d97949..f869013 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -37,21 +37,14 @@ function lexer(input: string): Token[] { */ // eslint-disable-next-line const matchQuotation = (currentChar: string, validator: RegExp, TokenType: TokenType) => { - // let value = ''; - // let start = current; - // let startLine = line; - do { if (currentChar === '\n') { line++; } - // value += currentChar; currentChar = input[++current]; } while (!validator.test(currentChar)); - // value += currentChar; ++current; - // console.log(TokenType, value, start, startLine, current) }; while (current < input.length) { diff --git a/test/parser/flinksql/syntax.test.ts b/test/parser/flinksql/syntax.test.ts index f7dc3c1..06e0289 100644 --- a/test/parser/flinksql/syntax.test.ts +++ b/test/parser/flinksql/syntax.test.ts @@ -1,6 +1,5 @@ import SQLParser from '../../../src/parser/flinksql'; import sqlMockData from '../../mock/flinkSql'; -import * as utils from '../../../src/utils'; describe('FlinkSQL Syntax Tests', () => { const parser = new SQLParser(); @@ -219,13 +218,4 @@ describe('FlinkSQL Syntax Tests', () => { const result = parser.validate(sql); expect(result.length).toBe(0); }); - // test('Test complex sql Statement with splitSql', () => { - // const sql = sqlMockData.allSqlStr; - // const result = []; - // utils.splitSql(sql).forEach((ele) => { - // const tempRul = parser.validate(utils.cleanSql(ele)); - // result.push(...tempRul); - // }); - // expect(result.length).toBe(0); - // }); });