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