diff --git a/src/main/antlr4/astRefactor/astRefactor.g4 b/src/main/antlr4/astRefactor/astRefactor.g4 index 7d811e2a..43e9d7e9 100644 --- a/src/main/antlr4/astRefactor/astRefactor.g4 +++ b/src/main/antlr4/astRefactor/astRefactor.g4 @@ -76,9 +76,9 @@ staticclassname: STATICCLASSNAME; statement: whileinterface | methodcallinterface | returninterface | javainternalexpressioninterface | forstmt | ifstmt | BLOCK | EMPTYSTMT | LOCALVARDECL | ASSIGN | LOCALVAR; -ifstmt: IFSTMT')''{'( NEWLINE )*'}'; +ifstmt: IFSTMT ( syntaxtreenode )* ')''{'( syntaxtreenode )*'}'; -forstmt: FORSMT')''{'( NEWLINE )*'}'; +forstmt: FORSMT ( syntaxtreenode )* ')''{'( syntaxtreenode )*'}'; javainternalexpressioninterface: UNARYEXPR; @@ -90,9 +90,9 @@ methodcallinterface: METHODCALL | THISCALL | SUPERCALL | NEWCLASS; whileinterface: whilestmt | dostmt; -dostmt: DOSTMT ( NEWLINE )*'}' (NEWLINE)* whilestmt ; +dostmt: DOSTMT ( syntaxtreenode )*'}' WHILESTMT ( syntaxtreenode )+')'; -whilestmt: WHILESTMT')''{'( NEWLINE)*'}'; +whilestmt: WHILESTMT')''{'( syntaxtreenode)*'}'; assignleft: assigntofield | ASSIGNLEFTSIDE;