@@ -341,11 +341,13 @@ forEachStmt :
341
341
342
342
// expression EQ expression refactored to expression to allow SLL
343
343
forNextStmt :
344
- FOR whiteSpace expression whiteSpace TO whiteSpace expression (whiteSpace STEP whiteSpace expression)? endOfStatement
344
+ FOR whiteSpace expression whiteSpace TO whiteSpace expression stepStmt? whiteSpace* endOfStatement
345
345
block
346
346
statementLabelDefinition? whiteSpace? NEXT (whiteSpace expression)?
347
347
;
348
348
349
+ stepStmt : whiteSpace STEP whiteSpace expression;
350
+
349
351
functionStmt :
350
352
(visibility whiteSpace)? (STATIC whiteSpace)? FUNCTION whiteSpace? functionName (whiteSpace? argList)? (whiteSpace? asTypeClause)? endOfStatement
351
353
block
@@ -588,6 +590,8 @@ visibility : PRIVATE | PUBLIC | FRIEND | GLOBAL;
588
590
expression :
589
591
// Literal Expression has to come before lExpression, otherwise it'll be classified as simple name expression instead.
590
592
whiteSpace? LPAREN whiteSpace? expression whiteSpace? RPAREN # parenthesizedExpr
593
+ | TYPEOF whiteSpace expression # typeofexpr // To make the grammar SLL, the type-of-is-expression is actually the child of an IS relational op.
594
+ | HASH expression # markedFileNumberExpr // Added to support special forms such as Input(file1, #file1)
591
595
| NEW whiteSpace expression # newExpr
592
596
| expression whiteSpace? POW whiteSpace? expression # powOp
593
597
| MINUS whiteSpace? expression # unaryMinusOp
@@ -606,8 +610,6 @@ expression :
606
610
| literalExpression # literalExpr
607
611
| lExpression # lExpr
608
612
| builtInType # builtInTypeExpr
609
- | TYPEOF whiteSpace expression # typeofexpr // To make the grammar SLL, the type-of-is-expression is actually the child of an IS relational op.
610
- | HASH expression # markedFileNumberExpr // Added to support special forms such as Input(file1, #file1)
611
613
;
612
614
613
615
// 5.6.5 Literal Expressions
0 commit comments