@ -515,11 +515,11 @@ module.exports = grammar({
/ * *
/ * *
* StructuralInstance : : = ConstrApp { 'with' ConstrApp } [ 'with' WithTemplateBody ]
* StructuralInstance : : = ConstrApp { 'with' ConstrApp } [ 'with' WithTemplateBody ]
* /
* /
_structural _instance : $ => seq(
_structural _instance : $ => prec. left ( PREC . compound , seq(
$ . _constructor _application ,
$ . _constructor _application ,
'with' ,
'with' ,
field ( 'body' , $ . with _template _body ) ,
field ( 'body' , $ . with _template _body ) ,
) ,
) ) ,
/ * *
/ * *
* ConstrApp : : = SimpleType1 { Annotation } { ParArgumentExprs }
* ConstrApp : : = SimpleType1 { Annotation } { ParArgumentExprs }
@ -545,6 +545,11 @@ module.exports = grammar({
) ,
) ,
) ) ,
) ) ,
_constructor _applications : $ => prec . left ( choice (
commaSep1 ( $ . _constructor _application ) ,
sep1 ( 'with' , $ . _constructor _application ) ,
) ) ,
modifiers : $ => repeat1 ( choice (
modifiers : $ => repeat1 ( choice (
'abstract' ,
'abstract' ,
'final' ,
'final' ,
@ -575,9 +580,12 @@ module.exports = grammar({
open _modifier : $ => 'open' ,
open _modifier : $ => 'open' ,
transparent _modifier : $ => 'transparent' ,
transparent _modifier : $ => 'transparent' ,
/ * *
* InheritClauses : : = [ 'extends' ConstrApps ] [ 'derives' QualId { ',' QualId } ]
* /
extends _clause : $ => prec . left ( seq (
extends _clause : $ => prec . left ( seq (
'extends' ,
'extends' ,
field ( 'type' , $ . _type ) ,
field ( 'type' , $ . _ constructor_applications ) ,
optional ( $ . arguments )
optional ( $ . arguments )
) ) ,
) ) ,