mirror of https://github.com/t1meshift/js.git
Postpone template strings and for/of support
parent
e10f7cca41
commit
124d299d23
|
@ -192,7 +192,7 @@ StringLiteral: ('"' DoubleStringCharacter* '"'
|
||||||
;
|
;
|
||||||
|
|
||||||
// TODO: `${`tmp`}`
|
// TODO: `${`tmp`}`
|
||||||
TemplateStringLiteral: '`' ('\\`' | ~'`')* '`';
|
//TemplateStringLiteral: '`' ('\\`' | ~'`')* '`';
|
||||||
|
|
||||||
WhiteSpaces: [\t\u000B\u000C\u0020\u00A0]+ -> channel(HIDDEN);
|
WhiteSpaces: [\t\u000B\u000C\u0020\u00A0]+ -> channel(HIDDEN);
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ iterationStatement
|
||||||
| For '(' (expressionSequence | variableDeclarationList)? ';' expressionSequence? ';' expressionSequence? ')' statement # ForStatement
|
| For '(' (expressionSequence | variableDeclarationList)? ';' expressionSequence? ';' expressionSequence? ')' statement # ForStatement
|
||||||
| For '(' (singleExpression | variableDeclarationList) In expressionSequence ')' statement # ForInStatement
|
| For '(' (singleExpression | variableDeclarationList) In expressionSequence ')' statement # ForInStatement
|
||||||
// strange, 'of' is an identifier. and self.p("of") not work in sometime.
|
// 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
|
varModifier // let, const - ECMAScript 6
|
||||||
|
@ -346,7 +346,7 @@ singleExpression
|
||||||
| <assoc=right> singleExpression '=' singleExpression # AssignmentExpression
|
| <assoc=right> singleExpression '=' singleExpression # AssignmentExpression
|
||||||
| <assoc=right> singleExpression assignmentOperator singleExpression # AssignmentOperatorExpression
|
| <assoc=right> singleExpression assignmentOperator singleExpression # AssignmentOperatorExpression
|
||||||
| Import '(' singleExpression ')' # ImportExpression
|
| Import '(' singleExpression ')' # ImportExpression
|
||||||
| singleExpression TemplateStringLiteral # TemplateStringExpression // ECMAScript 6
|
// | singleExpression TemplateStringLiteral # TemplateStringExpression // ECMAScript 6
|
||||||
// | yieldStatement # YieldExpression // ECMAScript 6
|
// | yieldStatement # YieldExpression // ECMAScript 6
|
||||||
| This # ThisExpression
|
| This # ThisExpression
|
||||||
| identifier # IdentifierExpression
|
| identifier # IdentifierExpression
|
||||||
|
@ -402,7 +402,7 @@ literal
|
||||||
: NullLiteral
|
: NullLiteral
|
||||||
| BooleanLiteral
|
| BooleanLiteral
|
||||||
| StringLiteral
|
| StringLiteral
|
||||||
| TemplateStringLiteral
|
// | TemplateStringLiteral
|
||||||
| RegularExpressionLiteral
|
| RegularExpressionLiteral
|
||||||
| numericLiteral
|
| numericLiteral
|
||||||
| bigintLiteral
|
| bigintLiteral
|
||||||
|
|
Loading…
Reference in New Issue