chroe: devops (#180)
* ci: add dependencies about lint tool * ci: replace eslint with prettier * ci: add husky, cz and commitlint * style: lint fix via prettier * ci: add prettier and check-types to github workflow '
This commit is contained in:
@ -30,12 +30,10 @@ export default abstract class PostgreSQLLexerBase extends Lexer {
|
||||
return this._input;
|
||||
}
|
||||
checkLA( c) {
|
||||
// eslint-disable-next-line new-cap
|
||||
return this.getInputStream().LA(1) !== c;
|
||||
}
|
||||
|
||||
charIsLetter() {
|
||||
// eslint-disable-next-line new-cap
|
||||
return isLetter(this.getInputStream().LA(-1));
|
||||
}
|
||||
|
||||
@ -53,11 +51,9 @@ export default abstract class PostgreSQLLexerBase extends Lexer {
|
||||
}
|
||||
|
||||
UnterminatedBlockCommentDebugAssert() {
|
||||
// Debug.Assert(InputStream.LA(1) == -1 /*EOF*/);
|
||||
}
|
||||
|
||||
CheckIfUtf32Letter() {
|
||||
// eslint-disable-next-line new-cap
|
||||
let codePoint = this.getInputStream().LA(-2) << 8 + this.getInputStream().LA(-1);
|
||||
let c;
|
||||
if (codePoint < 0x10000) {
|
||||
|
@ -1,9 +1,7 @@
|
||||
/* eslint-disable new-cap,camelcase */
|
||||
import { CharStreams, CommonTokenStream, Parser } from 'antlr4ts';
|
||||
import { PostgreSQLLexer } from './PostgreSQLLexer';
|
||||
import { PostgreSQLParser } from './PostgreSQLParser';
|
||||
|
||||
// @ts-ignore
|
||||
export default abstract class PostgreSQLParserBase extends Parser {
|
||||
constructor( input) {
|
||||
super(input);
|
||||
@ -32,16 +30,13 @@ export default abstract class PostgreSQLParserBase extends Parser {
|
||||
}
|
||||
}
|
||||
if (!lang) return;
|
||||
// eslint-disable-next-line camelcase
|
||||
let func_as = null;
|
||||
for (const a of _localctx.createfunc_opt_item()) {
|
||||
if (!a.func_as()) {
|
||||
// eslint-disable-next-line camelcase
|
||||
func_as = a;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line camelcase
|
||||
if (!func_as) {
|
||||
const txt = this.GetRoutineBodyString(func_as.func_as().sconst(0));
|
||||
const line = func_as.func_as().sconst(0).start.getLine();
|
||||
@ -76,7 +71,6 @@ export default abstract class PostgreSQLParserBase extends Parser {
|
||||
|
||||
GetRoutineBodyString( rule) {
|
||||
const anysconst = rule.anysconst();
|
||||
// eslint-disable-next-line new-cap
|
||||
const StringConstant = anysconst.StringConstant();
|
||||
if (null !== StringConstant) return this.unquote(this.TrimQuotes(StringConstant.getText()));
|
||||
const UnicodeEscapeStringConstant = anysconst.UnicodeEscapeStringConstant();
|
||||
|
Reference in New Issue
Block a user