Postpone template strings and for/of support

master
Yury Kurlykov 2020-04-26 21:21:03 +10:00
parent e10f7cca41
commit 124d299d23
Signed by: t1meshift
GPG Key ID: B133F3167ABF94D8
2 changed files with 4 additions and 4 deletions

View File

@ -192,7 +192,7 @@ StringLiteral: ('"' DoubleStringCharacter* '"'
;
// TODO: `${`tmp`}`
TemplateStringLiteral: '`' ('\\`' | ~'`')* '`';
//TemplateStringLiteral: '`' ('\\`' | ~'`')* '`';
WhiteSpaces: [\t\u000B\u000C\u0020\u00A0]+ -> channel(HIDDEN);

View File

@ -150,7 +150,7 @@ iterationStatement
| For '(' (expressionSequence | variableDeclarationList)? ';' expressionSequence? ';' expressionSequence? ')' statement # ForStatement
| For '(' (singleExpression | variableDeclarationList) In expressionSequence ')' statement # ForInStatement
// strange, 'of' is an identifier. and self.p("of") not work in sometime.
| For /*Await?*/ '(' (singleExpression | variableDeclarationList) identifier{self.p("of")}? expressionSequence ')' statement # ForOfStatement
// | For /*Await?*/ '(' (singleExpression | variableDeclarationList) identifier{self.p("of")}? expressionSequence ')' statement # ForOfStatement
;
varModifier // let, const - ECMAScript 6
@ -346,7 +346,7 @@ singleExpression
| <assoc=right> singleExpression '=' singleExpression # AssignmentExpression
| <assoc=right> singleExpression assignmentOperator singleExpression # AssignmentOperatorExpression
| Import '(' singleExpression ')' # ImportExpression
| singleExpression TemplateStringLiteral # TemplateStringExpression // ECMAScript 6
// | singleExpression TemplateStringLiteral # TemplateStringExpression // ECMAScript 6
// | yieldStatement # YieldExpression // ECMAScript 6
| This # ThisExpression
| identifier # IdentifierExpression
@ -402,7 +402,7 @@ literal
: NullLiteral
| BooleanLiteral
| StringLiteral
| TemplateStringLiteral
// | TemplateStringLiteral
| RegularExpressionLiteral
| numericLiteral
| bigintLiteral