From b4172066e795197e8b75f5a3125bff5ff1e2b6a4 Mon Sep 17 00:00:00 2001 From: Linus K Date: Mon, 24 Oct 2022 06:39:36 +0200 Subject: [PATCH] Small change --- src/main/antlr4/astRefactor/astRefactor.g4 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/antlr4/astRefactor/astRefactor.g4 b/src/main/antlr4/astRefactor/astRefactor.g4 index e793ba0d..3bcafee6 100644 --- a/src/main/antlr4/astRefactor/astRefactor.g4 +++ b/src/main/antlr4/astRefactor/astRefactor.g4 @@ -8,8 +8,9 @@ syntaxtreenode: typablestatement | reftypeortphorwildcardorgeneric | methodinter class : ACCESSMODIFIER WHITESPACE CLASS WHITESPACE CLASSNAME '{'(NEWLINE)* classbody'}'; classbody : ( method | variable | NEWLINE | syntaxtreenode)*; -variable : ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME WHITESPACE '=' WHITESPACE ( WORD | NUMBER) (';')? - | ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME (';')?; +variable : ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME WHITESPACE '=' WHITESPACE ( WORD | NUMBER) (';')? + | ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME (';')? + | ( formalparameter | typeplaceholder) WHITESPACE NAME (';')?; method : ACCESSMODIFIER WHITESPACE ( syntaxtreenode ) WHITESPACE NAME '(' ( formalparameter | typeplaceholder ) WHITESPACE WORD ')''{''}'; @@ -84,7 +85,7 @@ javainternalexpressioninterface: UNARYEXPR; returninterface: RETURN | returnvoid; -returnvoid: RETURN VOID; +returnvoid: RETURN WHITESPACE VOID';'; methodcallinterface: METHODCALL | THISCALL | SUPERCALL | NEWCLASS; @@ -92,7 +93,7 @@ whileinterface: whilestmt | dostmt; dostmt: DOSTMT ( syntaxtreenode )*'}' WHILESTMT ( syntaxtreenode )+')'; -whilestmt: WHILESTMT( syntaxtreenode )*')''{'( syntaxtreenode)*'}'; +whilestmt: WHILESTMT( syntaxtreenode )*')''{'( syntaxtreenode )*'}'; assignleft: assigntofield | ASSIGNLEFTSIDE;