diff --git a/syntax/midas.ebnf b/syntax/midas.ebnf index a2bf9de..1caa366 100644 --- a/syntax/midas.ebnf +++ b/syntax/midas.ebnf @@ -66,15 +66,13 @@ Params ::= ( ) ParamSpec ::= "(" Params? ")" -TypeProperty ::= Identifier ":" Type -ComplexType ::= "{" TypeProperty* "}" NamedType ::= Identifier TypeArgs ::= "[" (Type ("," Type)*)? "]" FrameColumn ::= TOKEN ":" Type FrameSchema ::= "[" (FrameColumn ("," FrameColumn)*)? "]" GenericType ::= "Frame" FrameSchema | NamedType TypeArgs? GroupedType ::= "(" Type ")" -BaseType ::= GroupedType | ComplexType | GenericType +BaseType ::= GroupedType | GenericType ConstraintType ::= BaseType ("where" Constraint)? FuncType ::= "fn" ParamSpec "->" Type Type ::= ConstraintType diff --git a/syntax/midas.typ b/syntax/midas.typ index 736d0a3..9d8d805 100644 --- a/syntax/midas.typ +++ b/syntax/midas.typ @@ -72,14 +72,6 @@ svg.railroad .terminal rect { {[`template` "[" "]"]} ``` -#let type-property = ``` -{[`type-property` 'identifier' ":" 'type']} -``` - -#let complex-type = ``` -{[`complex-type` "{" "}"]} -``` - #let named-type = ``` {[`named-type` 'identifier']} ``` @@ -101,7 +93,7 @@ svg.railroad .terminal rect { ``` #let base-type = ``` -{[`base-type` <'grouped-type', 'complex-type', 'generic-type'>]} +{[`base-type` <'grouped-type', 'generic-type'>]} ``` #let constraint-type = ``` @@ -169,7 +161,6 @@ svg.railroad .terminal rect { template-param: template-param, template: template, type-property: type-property, - complex-type: complex-type, named-type: named-type, type-args: type-args, generic-type: generic-type, @@ -196,7 +187,6 @@ svg.railroad .terminal rect { "template", "type-property", "call-args", - "complex-type", "type-args", "named-type", "grouped-type",