2020%token INTERFACE
2121%token IMPLEMENTS
2222%token EXTENDS
23- %token SUPER
2423%token ENUM
2524%token NEW
2625%token INSTANCEOF
@@ -108,25 +107,6 @@ import_name_end:
108107 | DOT IDENT import_name_end
109108 {}
110109
111- type_arguments :
112- | LANGLE type_argument_list RANGLE
113- {}
114-
115- type_argument_list :
116- | separated_nonempty_list (COMMA, type_argument )
117- {}
118-
119- type_argument :
120- | unann_reference_type // If we decide to parse annotations , it will
121- // require change here
122- | QMARK wildcard_bounds ?
123- {}
124-
125- wildcard_bounds :
126- | EXTENDS unann_reference_type
127- | SUPER unann_reference_type
128- {}
129-
130110package_declaration :
131111 | PACKAGE unann_class_or_interface_type SEMICOLON
132112 { $2 }
@@ -146,18 +126,18 @@ class_declaration:
146126normal_class_declaration :
147127 | CLASS id = identifier superclass? superinterfaces? inner= class_body
148128 { {
149- location = location_of_pos $ startpos(id);
150- kind = Class id;
151- inner_elements = inner;
129+ location = location_of_pos $ startpos(id);
130+ kind = Class id;
131+ inner_elements = inner;
152132 }
153133 }
154134
155135enum_declaration:
156136 | ENUM id= identifier superinterfaces? inner= enum_body
157137 { {
158- location = location_of_pos $ startpos(id);
159- kind = Enum id;
160- inner_elements = inner;
138+ location = location_of_pos $ startpos(id);
139+ kind = Enum id;
140+ inner_elements = inner;
161141 }
162142 }
163143
@@ -235,9 +215,9 @@ interface_declaration:
235215normal_interface_declaration:
236216 | INTERFACE id= identifier inner= interface_body
237217 { {
238- location = location_of_pos $ startpos(id);
239- kind = Interface id;
240- inner_elements = inner;
218+ location = location_of_pos $ startpos(id);
219+ kind = Interface id;
220+ inner_elements = inner;
241221 }
242222 }
243223
@@ -697,11 +677,11 @@ unqualified_class_instance_creation_expression:
697677 { $ 4 }
698678 | NEW class_or_interface_type_to_instantiate LPAREN args= loption(argument_list) RPAREN inner= class_body
699679 { args @
700- [{
701- location = location_of_pos $ startpos(inner);
702- kind = AnonymousClass ;
703- inner_elements = inner;
704- }]
680+ [{
681+ location = location_of_pos $ startpos(inner);
682+ kind = AnonymousClass ;
683+ inner_elements = inner;
684+ }]
705685 }
706686
707687conditional_expression:
0 commit comments