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