Small change
This commit is contained in:
parent
26a539e440
commit
5ea3deacfd
@ -7,10 +7,10 @@ grammar astRefactor;
|
||||
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) ';'
|
||||
| ACCESSMODIFIER WHITESPACE ( MODIFIER WHITESPACE )? NAME ';';
|
||||
variable : ACCESSMODIFIER WHITESPACE ( MODIFIER | TYPEPLACEHOLDER )WHITESPACE NAME WHITESPACE '=' WHITESPACE ( WORD | NUMBER) ';'
|
||||
| ACCESSMODIFIER WHITESPACE ( MODIFIER | TYPEPLACEHOLDER ) WHITESPACE NAME ';';
|
||||
|
||||
method : ACCESSMODIFIER WHITESPACE ( MODIFIER WHITESPACE )? NAME '(' MODIFIER WHITESPACE WORD ')';
|
||||
method : ACCESSMODIFIER WHITESPACE ( MODIFIER | TYPEPLACEHOLDER ) WHITESPACE NAME '(' ( MODIFIER | TYPEPLACEHOLDER ) WHITESPACE WORD ')';
|
||||
|
||||
|
||||
syntaxtreenode: typablestatement | reftypeortphorwildcardorgeneric | methodinterface | fieldinterface | formalparameter | parameterlist | generictypevar | sourcefile | genericdecllist | argumentlist | classorinterface;
|
||||
|
@ -20,9 +20,10 @@ public class SwitchTest {
|
||||
System.out.println("argumentList");
|
||||
}
|
||||
case ClassOrInterface classOrInterface -> {
|
||||
System.out.println("ClassOrInterface: \n" +
|
||||
"Modifier = " + classOrInterface.getModifiers() + "\n" +
|
||||
"Classname = " + classOrInterface.getClassName());
|
||||
int mod = classOrInterface.getModifiers();
|
||||
if (mod == 1) {
|
||||
System.out.println("ClassOrInterface: \n" + "public PLACEHOLDER " + classOrInterface.getClassName() + "{}");
|
||||
}
|
||||
}
|
||||
case FormalParameter formalParameter -> {
|
||||
System.out.println("formalParameter");
|
||||
|
Loading…
Reference in New Issue
Block a user