@@ -33,10 +33,10 @@ argumentList : namedArgument ( C namedArgument )* | expressionList ( C namedArgu
3333argumentPart : typeArguments? arguments ;
3434arguments : OP ( argumentList C ? )? CP ;
3535asOperator : AS_ ;
36- assertion : ASSERT_ OP expression ( C expression )? C ? CP ;
36+ assertion : ASSERT_ OP expr ( C expr )? C ? CP ;
3737assertStatement : assertion SC ;
3838assignableExpression : primary assignableSelectorPart | SUPER_ unconditionalAssignableSelector | identifier ;
39- assignableSelector : unconditionalAssignableSelector | QUD identifier | QU OB expression CB ;
39+ assignableSelector : unconditionalAssignableSelector | QUD identifier | QU OB expr CB ;
4040assignableSelectorPart : selector* assignableSelector ;
4141assignmentOperator : EQ | compoundAssignmentOperator ;
4242awaitExpression : AWAIT_ unaryExpression ;
@@ -52,12 +52,12 @@ cascade : cascade DD cascadeSection | conditionalExpression ( QUDD | DD ) cascad
5252cascadeAssignment : assignmentOperator expressionWithoutCascade ;
5353cascadeSection : cascadeSelector cascadeSectionTail ;
5454cascadeSectionTail : cascadeAssignment | selector* ( assignableSelector cascadeAssignment )? ;
55- cascadeSelector : OB expression CB | identifier ;
55+ cascadeSelector : OB expr CB | identifier ;
5656catchPart : CATCH_ OP identifier ( C identifier )? CP ;
5757classDeclaration : ABSTRACT_ ? CLASS_ typeIdentifier typeParameters? superclass? interfaces? OBC ( metadata classMemberDeclaration )* CBC | ABSTRACT_ ? CLASS_ mixinApplicationClass ;
5858classMemberDeclaration : declaration SC | methodSignature functionBody ;
5959combinator : SHOW_ identifierList | HIDE_ identifierList ;
60- compilationUnit : (libraryDeclaration | partDeclaration | expression | statement) EOF ;
60+ compilationUnit : (libraryDeclaration | partDeclaration | expr | statement) EOF ;
6161compoundAssignmentOperator : STE | SE | SQSE | PE | PLE | ME | LTLTE | GT GT GT EQ | GT GT EQ | AE | CIRE | POE | QUQUEQ ;
6262conditionalExpression : ifNullExpression ( QU expressionWithoutCascade CO expressionWithoutCascade )? ;
6363configurableUri : uri configurationUri* ;
@@ -72,20 +72,20 @@ continueStatement : CONTINUE_ identifier? SC ;
7272declaration :ABSTRACT_ ? ( EXTERNAL_ factoryConstructorSignature | EXTERNAL_ constantConstructorSignature | EXTERNAL_ constructorSignature | ( EXTERNAL_ STATIC_ ? )? getterSignature | ( EXTERNAL_ STATIC_ ? )? setterSignature | ( EXTERNAL_ STATIC_ ? )? functionSignature | EXTERNAL_ ? operatorSignature | STATIC_ CONST_ type? staticFinalDeclarationList | STATIC_ FINAL_ type? staticFinalDeclarationList | STATIC_ LATE_ FINAL_ type? initializedIdentifierList | STATIC_ LATE_ ? varOrType initializedIdentifierList | COVARIANT_ LATE_ FINAL_ type? identifierList | COVARIANT_ LATE_ ? varOrType initializedIdentifierList | LATE_ ? FINAL_ type? initializedIdentifierList | LATE_ ? varOrType initializedIdentifierList | redirectingFactoryConstructorSignature | constantConstructorSignature ( redirection | initializers )? | constructorSignature ( redirection | initializers )? );
7373declaredIdentifier : COVARIANT_ ? finalConstVarOrType identifier ;
7474defaultCase : label* DEFAULT_ CO statements ;
75- defaultFormalParameter : normalFormalParameter ( EQ expression )? ;
76- defaultNamedParameter : metadata REQUIRED_ ? normalFormalParameterNoMetadata ( ( EQ | CO ) expression )? ;
77- doStatement : DO_ statement WHILE_ OP expression CP SC ;
75+ defaultFormalParameter : normalFormalParameter ( EQ expr )? ;
76+ defaultNamedParameter : metadata REQUIRED_ ? normalFormalParameterNoMetadata ( ( EQ | CO ) expr )? ;
77+ doStatement : DO_ statement WHILE_ OP expr CP SC ;
7878dottedIdentifierList : identifier ( D identifier )* ;
7979element : expressionElement | mapElement | spreadElement | ifElement | forElement ;
8080elements : element ( C element )* C ? ;
8181enumEntry : metadata identifier ;
8282enumType : ENUM_ identifier OBC enumEntry ( C enumEntry )* C ? CBC ;
8383equalityExpression : relationalExpression ( equalityOperator relationalExpression )? | SUPER_ equalityOperator relationalExpression ;
8484equalityOperator : EE | NE ;
85- expression : assignableExpression assignmentOperator expression | conditionalExpression | cascade | throwExpression ;
86- expressionElement : expression ;
87- expressionList : expression ( C expression )* ;
88- expressionStatement : expression ? SC ;
85+ expr : assignableExpression assignmentOperator expr | conditionalExpression | cascade | throwExpression ;
86+ expressionElement : expr ;
87+ expressionList : expr ( C expr )* ;
88+ expressionStatement : expr ? SC ;
8989expressionWithoutCascade : assignableExpression assignmentOperator expressionWithoutCascade | conditionalExpression | throwExpressionWithoutCascade ;
9090extensionDeclaration : EXTENSION_ identifier? typeParameters? ON_ type OBC ( metadata classMemberDeclaration )* CBC ;
9191factoryConstructorSignature : CONST_ ? FACTORY_ constructorName formalParameterList ;
@@ -94,14 +94,14 @@ fieldInitializer : ( THIS_ D )? identifier EQ initializerExpression ;
9494finalConstVarOrType : LATE_ ? FINAL_ type? | CONST_ type? | LATE_ ? varOrType ;
9595finallyPart : FINALLY_ block ;
9696forElement : AWAIT_ ? FOR_ OP forLoopParts CP element ;
97- forInitializerStatement : localVariableDeclaration | expression ? SC ;
98- forLoopParts : forInitializerStatement expression ? SC expressionList? | metadata declaredIdentifier IN_ expression | identifier IN_ expression ;
97+ forInitializerStatement : localVariableDeclaration | expr ? SC ;
98+ forLoopParts : forInitializerStatement expr ? SC expressionList? | metadata declaredIdentifier IN_ expr | identifier IN_ expr ;
9999formalParameterList : OP CP | OP normalFormalParameters C ? CP | OP normalFormalParameters C optionalOrNamedFormalParameters CP | OP optionalOrNamedFormalParameters CP ;
100100formalParameterPart : typeParameters? formalParameterList ;
101101forStatement : AWAIT_ ? FOR_ OP forLoopParts CP statement ;
102- functionBody :NATIVE_ stringLiteral? SC | ASYNC_ ? EG expression SC | ( ASYNC_ ST ? | SYNC_ ST )? block ;
102+ functionBody :NATIVE_ stringLiteral? SC | ASYNC_ ? EG expr SC | ( ASYNC_ ST ? | SYNC_ ST )? block ;
103103functionExpression : formalParameterPart functionExpressionBody ;
104- functionExpressionBody : ASYNC_ ? EG expression | ( ASYNC_ ST ? | SYNC_ ST )? block ;
104+ functionExpressionBody : ASYNC_ ? EG expr | ( ASYNC_ ST ? | SYNC_ ST )? block ;
105105functionFormalParameter : COVARIANT_ ? type? identifier formalParameterPart QU ? ;
106106functionPrefix : type? identifier ;
107107functionSignature : type? identifier formalParameterPart ;
@@ -112,22 +112,22 @@ functionTypeTails : functionTypeTail QU? functionTypeTails | functionTypeTail ;
112112getterSignature : type? GET_ identifier ;
113113identifier : IDENTIFIER | ABSTRACT_ | AS_ | COVARIANT_ | DEFERRED_ | DYNAMIC_ | EXPORT_ | EXTERNAL_ | EXTENSION_ | FACTORY_ | FUNCTION_ | GET_ | IMPLEMENTS_ | IMPORT_ | INTERFACE_ | LATE_ | LIBRARY_ | MIXIN_ | OPERATOR_ | PART_ | REQUIRED_ | SET_ | STATIC_ | TYPEDEF_ | FUNCTION_ | ASYNC_ | HIDE_ | OF_ | ON_ | SHOW_ | SYNC_ | AWAIT_ | YIELD_ | DYNAMIC_ | NATIVE_ ;
114114identifierList : identifier ( C identifier )* ;
115- ifElement : IF_ OP expression CP element ( ELSE_ element )? ;
115+ ifElement : IF_ OP expr CP element ( ELSE_ element )? ;
116116ifNullExpression : logicalOrExpression ( QUQU logicalOrExpression )* ;
117- ifStatement : IF_ OP expression CP statement ( ELSE_ statement )? ;
117+ ifStatement : IF_ OP expr CP statement ( ELSE_ statement )? ;
118118importOrExport : libraryImport | libraryExport ;
119119importSpecification : IMPORT_ configurableUri ( DEFERRED_ ? AS_ identifier )? combinator* SC ;
120120incrementOperator : PLPL | MM ;
121- initializedIdentifier : identifier ( EQ expression )? ;
121+ initializedIdentifier : identifier ( EQ expr )? ;
122122initializedIdentifierList : initializedIdentifier ( C initializedIdentifier )* ;
123- initializedVariableDeclaration : declaredIdentifier ( EQ expression )? ( C initializedIdentifier )* ;
123+ initializedVariableDeclaration : declaredIdentifier ( EQ expr )? ( C initializedIdentifier )* ;
124124initializerExpression : conditionalExpression | cascade ;
125125initializerListEntry : SUPER_ arguments | SUPER_ D identifier arguments | fieldInitializer | assertion ;
126126initializers : CO initializerListEntry ( C initializerListEntry )* ;
127127interfaces : IMPLEMENTS_ typeNotVoidList ;
128128isOperator : IS_ NOT ? ;
129129label : identifier CO ;
130- letExpression : LET_ staticFinalDeclarationList IN_ expression ;
130+ letExpression : LET_ staticFinalDeclarationList IN_ expr ;
131131libraryDeclaration : libraryName? importOrExport* partDirective* ( metadata topLevelDeclaration )* ;
132132
133133libraryExport : metadata EXPORT_ configurableUri combinator* SC ;
@@ -139,7 +139,7 @@ localFunctionDeclaration : metadata functionSignature functionBody ;
139139localVariableDeclaration : metadata initializedVariableDeclaration SC ;
140140logicalAndExpression : equalityExpression ( AA equalityExpression )* ;
141141logicalOrExpression : logicalAndExpression ( PP logicalAndExpression )* ;
142- mapElement : expression CO expression ;
142+ mapElement : expr CO expr ;
143143metadata : ( AT metadatum )* ;
144144metadatum : identifier | qualifiedName | constructorDesignation arguments ;
145145methodSignature : constructorSignature initializers? | factoryConstructorSignature | STATIC_ ? functionSignature | STATIC_ ? getterSignature | STATIC_ ? setterSignature | operatorSignature ;
@@ -151,7 +151,7 @@ mixins : WITH_ typeNotVoidList ;
151151multilineString : MultiLineString;
152152multiplicativeExpression : unaryExpression ( multiplicativeOperator unaryExpression )* | SUPER_ ( multiplicativeOperator unaryExpression )+ ;
153153multiplicativeOperator : ST | SL | PC | SQS ;
154- namedArgument : label expression ;
154+ namedArgument : label expr ;
155155namedFormalParameters : OBC defaultNamedParameter ( C defaultNamedParameter )* C ? CBC ;
156156namedParameterType : metadata REQUIRED_ ? typedIdentifier ;
157157namedParameterTypes : OBC namedParameterType ( C namedParameterType )* C ? CBC ;
@@ -179,34 +179,34 @@ partHeader : metadata PART_ OF_ ( dottedIdentifierList | uri ) SC ;
179179postfixExpression : assignableExpression postfixOperator | primary selector* ;
180180postfixOperator : incrementOperator ;
181181prefixOperator : minusOperator | negationOperator | tildeOperator ;
182- primary : thisExpression | SUPER_ unconditionalAssignableSelector | SUPER_ argumentPart | functionExpression | literal | identifier | newExpression | constObjectExpression | constructorInvocation | OP expression CP ;
182+ primary : thisExpression | SUPER_ unconditionalAssignableSelector | SUPER_ argumentPart | functionExpression | literal | identifier | newExpression | constObjectExpression | constructorInvocation | OP expr CP ;
183183qualifiedName : typeIdentifier D identifier | typeIdentifier D typeIdentifier D identifier ;
184184redirectingFactoryConstructorSignature : CONST_ ? FACTORY_ constructorName formalParameterList EQ constructorDesignation ;
185185redirection : CO THIS_ ( D identifier )? arguments ;
186186relationalExpression : bitwiseOrExpression ( typeTest | typeCast | relationalOperator bitwiseOrExpression )? | SUPER_ relationalOperator bitwiseOrExpression ;
187187relationalOperator : GT EQ | GT | LTE | LT ;
188188reserved_word : ASSERT_ | BREAK_ | CASE_ | CATCH_ | CLASS_ | CONST_ | CONTINUE_ | DEFAULT_ | DO_ | ELSE_ | ENUM_ | EXTENDS_ | FALSE_ | FINAL_ | FINALLY_ | FOR_ | IF_ | IN_ | IS_ | NEW_ | NULL_ | RETHROW_ | RETURN_ | SUPER_ | SWITCH_ | THIS_ | THROW_ | TRUE_ | TRY_ | VAR_ | VOID_ | WHILE_ | WITH_ ;
189189rethrowStatement : RETHROW_ SC ;
190- returnStatement : RETURN_ expression ? SC ;
190+ returnStatement : RETURN_ expr ? SC ;
191191selector : NOT | assignableSelector | argumentPart ;
192192setOrMapLiteral : CONST_ ? typeArguments? OBC elements? CBC ;
193193setterSignature : type? SET_ identifier formalParameterList ;
194194shiftExpression : additiveExpression ( shiftOperator additiveExpression )* | SUPER_ ( shiftOperator additiveExpression )+ ;
195195shiftOperator : LTLT | GT GT GT | GT GT ;
196196simpleFormalParameter : declaredIdentifier | COVARIANT_ ? identifier ;
197197singleLineString : SingleLineString;
198- spreadElement : ( DDD | DDDQ ) expression ;
198+ spreadElement : ( DDD | DDDQ ) expr ;
199199statement : label* nonLabelledStatement ;
200200statements : statement* ;
201- staticFinalDeclaration : identifier EQ expression ;
201+ staticFinalDeclaration : identifier EQ expr ;
202202staticFinalDeclarationList : staticFinalDeclaration ( C staticFinalDeclaration )* ;
203203stringLiteral : ( multilineString | singleLineString )+ ;
204204superclass : EXTENDS_ typeNotVoid mixins? | mixins ;
205- switchCase : label* CASE_ expression CO statements ;
206- switchStatement : SWITCH_ OP expression CP OBC switchCase* defaultCase? CBC ;
205+ switchCase : label* CASE_ expr CO statements ;
206+ switchStatement : SWITCH_ OP expr CP OBC switchCase* defaultCase? CBC ;
207207symbolLiteral : PO ( identifier ( D identifier )* | operator | VOID_ ) ;
208208thisExpression : THIS_ ;
209- throwExpression : THROW_ expression ;
209+ throwExpression : THROW_ expr ;
210210throwExpressionWithoutCascade : THROW_ expressionWithoutCascade ;
211211tildeOperator : SQUIG ;
212212topLevelDeclaration : classDeclaration | mixinDeclaration | extensionDeclaration | enumType | typeAlias | EXTERNAL_ functionSignature SC | EXTERNAL_ getterSignature SC | EXTERNAL_ setterSignature SC | functionSignature functionBody | getterSignature functionBody | setterSignature functionBody | ( FINAL_ | CONST_ ) type? staticFinalDeclarationList SC | LATE_ FINAL_ type? initializedIdentifierList SC | LATE_ ? varOrType initializedIdentifierList SC ;
@@ -228,10 +228,10 @@ typeParameter : metadata identifier ( EXTENDS_ typeNotVoid )? ;
228228typeParameters : LT typeParameter ( C typeParameter )* GT ;
229229typeTest : isOperator typeNotVoid ;
230230unaryExpression : prefixOperator unaryExpression | awaitExpression | postfixExpression | ( minusOperator | tildeOperator ) SUPER_ | incrementOperator assignableExpression ;
231- unconditionalAssignableSelector : OB expression CB | D identifier ;
231+ unconditionalAssignableSelector : OB expr CB | D identifier ;
232232uri : stringLiteral ;
233233uriTest : dottedIdentifierList ( EE stringLiteral )? ;
234234varOrType : VAR_ | type ;
235- whileStatement : WHILE_ OP expression CP statement ;
236- yieldEachStatement : YIELD_ ST expression SC ;
237- yieldStatement : YIELD_ expression SC ;
235+ whileStatement : WHILE_ OP expr CP statement ;
236+ yieldEachStatement : YIELD_ ST expr SC ;
237+ yieldStatement : YIELD_ expr SC ;
0 commit comments