Grammatik-Regeln für "instanceof-PatternMatching" eingefügt

This commit is contained in:
luca9913 2022-11-24 22:33:23 +01:00
parent 09ac2fc5cf
commit df3e2b55f9
2 changed files with 7 additions and 0 deletions

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ bin
.DS_Store
.project
.settings/
.vscode/
/target/
settings.json

View File

@ -480,6 +480,7 @@ formalParameter
: variableModifier* unannType? variableDeclaratorId
;
//TODO: weitere erlaubte Modifiert für Variablen aufnehmen (https://www.w3schools.com/java/java_modifiers.asp)
variableModifier
: annotation
| 'final'
@ -1434,6 +1435,11 @@ castExpression
| '(' referenceType additionalBound* ')' lambdaExpression
;
// Java17
pattern
: variableModifier* referenceType annotation* Identifier
;
// LEXER
// §3.9 Keywords