mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
interfaces extend multiple interfaces
This commit is contained in:
parent
6b5201b9f3
commit
6270613b46
@ -1163,7 +1163,7 @@ scope TypeContext;
|
||||
-> ^(INTERFACE[$c.Token] identifier type_parameter_constraints_clauses? variant_generic_parameter_list? interface_base? interface_body );
|
||||
|
||||
interface_base:
|
||||
':' ts+=type (',' ts+=type)* -> ^(IMPLEMENTS $ts)*;
|
||||
c=':' ts+=type (',' ts+=type)* -> ^(EXTENDS[$c.token,"extends"] $ts)*;
|
||||
|
||||
interface_modifiers:
|
||||
modifier+ ;
|
||||
|
@ -837,11 +837,13 @@ type_parameter [Dictionary<string,StringTemplate> tpConstraints]
|
||||
identifier {if (tpConstraints == null || !tpConstraints.TryGetValue($identifier.text, out mySt)) {mySt = $identifier.st;}; } -> { mySt } ;
|
||||
|
||||
class_extends:
|
||||
^(EXTENDS ts=type) -> extends(types = { $ts.st }) ;
|
||||
ts+=class_extend+ -> extends(types = { $ts }) ;
|
||||
class_extend:
|
||||
^(EXTENDS ts=type) -> { $ts.st } ;
|
||||
class_implements:
|
||||
ts+=class_implement+ -> imps(types = { $ts }) ;
|
||||
class_implement:
|
||||
^(IMPLEMENTS ts=type) -> seplist(items = { $ts.st }, sep={", "}) ;
|
||||
^(IMPLEMENTS ts=type) -> { $ts.st };
|
||||
|
||||
interface_type_list:
|
||||
ts+=type (',' ts+=type)* -> commalist(items={ $ts });
|
||||
|
@ -633,8 +633,10 @@ type_parameter_list:
|
||||
type_parameter:
|
||||
identifier ;
|
||||
|
||||
//class_extends:
|
||||
// ^(EXTENDS type*) ;
|
||||
class_extends:
|
||||
class_extend+ ;
|
||||
class_extend:
|
||||
^(EXTENDS type) ;
|
||||
|
||||
// If first implements type is a class then convert to extends
|
||||
class_implements:
|
||||
@ -785,7 +787,7 @@ parameter_array:
|
||||
///////////////////////////////////////////////////////
|
||||
interface_declaration:
|
||||
^(INTERFACE identifier type_parameter_constraints_clauses? variant_generic_parameter_list?
|
||||
class_implements? interface_body ) ;
|
||||
class_extends? interface_body ) ;
|
||||
interface_modifiers:
|
||||
modifier+ ;
|
||||
interface_base:
|
||||
|
Loading…
x
Reference in New Issue
Block a user