diff --git a/src/main/antlr4/astRefactor/astRefactor.g4 b/src/main/antlr4/astRefactor/astRefactor.g4 index d959f9eb..7d811e2a 100644 --- a/src/main/antlr4/astRefactor/astRefactor.g4 +++ b/src/main/antlr4/astRefactor/astRefactor.g4 @@ -8,10 +8,10 @@ syntaxtreenode: typablestatement | reftypeortphorwildcardorgeneric | methodinter class : ACCESSMODIFIER WHITESPACE CLASS WHITESPACE CLASSNAME '{'(NEWLINE)* classbody'}'; classbody : ( method | variable | NEWLINE | syntaxtreenode)*; -variable : ACCESSMODIFIER WHITESPACE ( formalparameter | typeplaceholder ) WHITESPACE NAME WHITESPACE '=' WHITESPACE ( WORD | NUMBER) ';' +variable : ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME WHITESPACE '=' WHITESPACE ( WORD | NUMBER) ';' | ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME ';'; -method : ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME '(' ( formalparameter | typeplaceholder ) WHITESPACE WORD ')'; +method : ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME '(' ( formalparameter | typeplaceholder ) WHITESPACE WORD ')''{''}'; classorinterface: class; @@ -74,7 +74,7 @@ expressionreceiver: EXPRESSIONRECEIVER; staticclassname: STATICCLASSNAME; -statement: whileinterface | methodcallinterface | returninterface | javainternalexpressioninterface | forstmt | BLOCK | EMPTYSTMT | LOCALVARDECL | ASSIGN | ifstmt | LOCALVAR; +statement: whileinterface | methodcallinterface | returninterface | javainternalexpressioninterface | forstmt | ifstmt | BLOCK | EMPTYSTMT | LOCALVARDECL | ASSIGN | LOCALVAR; ifstmt: IFSTMT')''{'( NEWLINE )*'}';