From 44d7e2410fff4bd6c7737c578d2fc347baa57016 Mon Sep 17 00:00:00 2001 From: Yury Kurlykov Date: Thu, 30 Apr 2020 00:58:22 +1000 Subject: [PATCH] Comment out RegularExpressionLiteral I'm not going to implement RegExp in the nearest future, so I don't think it is needed there uncommented. --- grammars/JavaScriptLexer.g4 | 2 +- grammars/JavaScriptParser.g4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars/JavaScriptLexer.g4 b/grammars/JavaScriptLexer.g4 index 7e2bc0b..cd40084 100644 --- a/grammars/JavaScriptLexer.g4 +++ b/grammars/JavaScriptLexer.g4 @@ -37,7 +37,7 @@ options { superClass=JavaScriptBaseLexer; } HashBangLine: { self.isStartOfFile()}? '#!' ~[\r\n\u2028\u2029]*; // only allowed at start MultiLineComment: '/*' .*? '*/' -> channel(HIDDEN); SingleLineComment: '//' ~[\r\n\u2028\u2029]* -> channel(HIDDEN); -RegularExpressionLiteral: '/' RegularExpressionFirstChar RegularExpressionChar* {self.isRegexPossible()}? '/' IdentifierPart*; +//RegularExpressionLiteral: '/' RegularExpressionFirstChar RegularExpressionChar* {self.isRegexPossible()}? '/' IdentifierPart*; OpenBracket: '['; CloseBracket: ']'; diff --git a/grammars/JavaScriptParser.g4 b/grammars/JavaScriptParser.g4 index b78c58e..2f01252 100644 --- a/grammars/JavaScriptParser.g4 +++ b/grammars/JavaScriptParser.g4 @@ -403,7 +403,7 @@ literal | BooleanLiteral | StringLiteral // | TemplateStringLiteral - | RegularExpressionLiteral +// | RegularExpressionLiteral | numericLiteral | bigintLiteral ;