Small change
This commit is contained in:
parent
cf3519c2cc
commit
dd33b17f5c
@ -5,8 +5,8 @@ grammar astRefactor;
|
||||
*/
|
||||
syntaxtreenode: typablestatement | reftypeortphorwildcardorgeneric | methodinterface | fieldinterface | formalparameter | parameterlist | generictypevar | sourcefile | genericdecllist | argumentlist | classorinterface;
|
||||
|
||||
class : ACCESSMODIFIER WHITESPACE CLASS WHITESPACE CLASSNAME '(' ( formalparameter| typeplaceholder ) WHITESPACE NAME ')''{'(NEWLINE)* classbody'}';
|
||||
classbody : ( method NEWLINE | variable NEWLINE )*;
|
||||
class : ACCESSMODIFIER WHITESPACE CLASS WHITESPACE CLASSNAME '(' (( formalparameter| typeplaceholder ) WHITESPACE NAME)* ')''{'(NEWLINE)* classbody'}';
|
||||
classbody : ( method NEWLINE | variable NEWLINE | NEWLINE | whilestmt | dostmt)*;
|
||||
|
||||
variable : ACCESSMODIFIER WHITESPACE ( formalparameter | typeplaceholder )WHITESPACE NAME WHITESPACE '=' WHITESPACE ( WORD | NUMBER) ';'
|
||||
| ACCESSMODIFIER WHITESPACE ( formalparameter | typeplaceholder ) WHITESPACE NAME ';';
|
||||
@ -82,7 +82,11 @@ returninterface: RETURN | RETURNVOID;
|
||||
|
||||
methodcallinterface: METHODCALL | THISCALL | SUPERCALL | NEWCLASS;
|
||||
|
||||
whileinterface: WHILESTMT | DOSTMT;
|
||||
whileinterface: whilestmt | dostmt;
|
||||
|
||||
dostmt: DOSTMT '{'( NEWLINE )*'}' (NEWLINE)* whilestmt ;
|
||||
|
||||
whilestmt: WHILESTMT'('')''{'( NEWLINE)*'}';
|
||||
|
||||
assignleft: assigntofield | ASSIGNLEFTSIDE;
|
||||
|
||||
@ -104,8 +108,8 @@ GENERICDECLLIST : 'List<T>';
|
||||
SOURCEFILE : WORD '.java';
|
||||
ASSIGNTOFIELD : 'assigntofield';
|
||||
ASSIGNLEFTSIDE : 'assignleftside';
|
||||
WHILESTMT : 'while()';
|
||||
DOSTMT : 'do()';
|
||||
WHILESTMT : 'while';
|
||||
DOSTMT : 'do';
|
||||
GENERICTYPEVAR : 'generictypevar';
|
||||
FORMALPARAMETER : ('int' | 'String' | 'double' | 'float' | 'boolean');
|
||||
FIELDDECLARATION : 'fielddeclaration';
|
||||
@ -120,7 +124,7 @@ GENERICREFTYPE : 'genericreftype';
|
||||
THIS : 'this';
|
||||
SUPER : 'super';
|
||||
FIELDVAR : 'fieldvar';
|
||||
NEWARRAY : 'new ArrayList<>()';
|
||||
NEWARRAY : 'new ArrayList';
|
||||
LITERAL : 'literal';
|
||||
CASTEXPR : 'castexpr';
|
||||
LAMBDAEXPRESSION : 'lambdaexpression';
|
||||
@ -128,12 +132,12 @@ INSTANCEOF : 'instanceOf';
|
||||
BINARYEXPR : 'binaryexpr';
|
||||
EXPRESSIONRECEIVER : 'expressionreceiver';
|
||||
STATICCLASSNAME : 'staticclassname';
|
||||
FORSMT : 'for()';
|
||||
FORSMT : 'for';
|
||||
BLOCK : 'block';
|
||||
EMPTYSTMT : 'emptystmt';
|
||||
LOCALVARDECL : 'localvardecl';
|
||||
ASSIGN : 'assign';
|
||||
IFSTMT : 'if()';
|
||||
IFSTMT : 'if';
|
||||
LOCALVAR : 'localvar';
|
||||
RETURN : 'return';
|
||||
RETURNVOID : 'return void';
|
||||
|
Loading…
Reference in New Issue
Block a user