Change to ANTLR

This commit is contained in:
Linus K 2022-10-23 19:51:59 +02:00
parent 2a89c4e69a
commit 26a539e440

View File

@ -4,7 +4,7 @@ grammar astRefactor;
* Parser Rules
*/
class : ACCESSMODIFIER WHITESPACE CLASS WHITESPACE NAME '(' MODIFIER WHITESPACE WORD ')''{'NEWLINE classbody'}';
class : ACCESSMODIFIER WHITESPACE CLASS WHITESPACE NAME '(' ( MODIFIER| TYPEPLACEHOLDER ) WHITESPACE NAME ')''{'NEWLINE classbody'}';
classbody : ( method NEWLINE | variable NEWLINE )+;
variable : ACCESSMODIFIER WHITESPACE ( MODIFIER WHITESPACE )? NAME WHITESPACE '=' WHITESPACE ( WORD | NUMBER) ';'