convert(StatementContext) Implementierung fortgesetzt

This commit is contained in:
luca9913 2023-02-12 07:51:31 +01:00
parent 40d0d6b63e
commit 0e981ce95c
2 changed files with 448 additions and 387 deletions

View File

@ -521,25 +521,25 @@ localTypeDeclaration
;
statement
: blockLabel=block
| ASSERT expression (':' expression)? ';'
| IF parExpression statement (ELSE statement)?
| FOR '(' forControl ')' statement
| WHILE parExpression statement
| DO statement WHILE parExpression ';'
| TRY block (catchClause+ finallyBlock? | finallyBlock)
| TRY resourceSpecification block catchClause* finallyBlock?
| SWITCH parExpression '{' switchBlockStatementGroup* switchLabel* '}'
| SYNCHRONIZED parExpression block
| RETURN expression? ';'
| THROW expression ';'
| BREAK identifier? ';'
| CONTINUE identifier? ';'
| YIELD expression ';' // Java17
| SEMI
| statementExpression=expression ';'
| switchExpression ';'? // Java17
| identifierLabel=identifier ':' statement
: blockLabel=block #blockstmt
| ASSERT expression (':' expression)? ';' #assertstmt
| IF parExpression statement (ELSE statement)? #conditionalstmt
| FOR '(' forControl ')' statement #forloop
| WHILE parExpression statement #whileloop
| DO statement WHILE parExpression ';' #dowhileloop
| TRY block (catchClause+ finallyBlock? | finallyBlock) #trycatchblock
| TRY resourceSpecification block catchClause* finallyBlock? #trycatchresource
| SWITCH parExpression '{' switchBlockStatementGroup* switchLabel* '}' #switchstmt
| SYNCHRONIZED parExpression block #synchronizedstmt
| RETURN expression? ';' #returnstmt
| THROW expression ';' #throstmt
| BREAK identifier? ';' #breakstmt
| CONTINUE identifier? ';' #continuestmt
| YIELD expression ';' #yieldstmt // Java17
| SEMI #semistmt
| statementExpression=expression ';' #stmtexpression
| switchExpression ';'? #switchexpression // Java17
| identifierLabel=identifier ':' statement #identifierlabel
;
catchClause