Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/docs/reference/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,12 @@ ClassConstr ::= [ClsTypeParamClause] [ConstrMods] ClsParamClauses
ConstrMods ::= {Annotation} [AccessModifier]
ObjectDef ::= id [Template]
EnumDef ::= id ClassConstr InheritClauses EnumBody
GivenDef ::= [GivenSig] (AnnotType [‘=’ Expr] | StructuralInstance)
GivenSig ::= [id] [DefTypeParamClause] {UsingParamClause} ‘:’ -- one of `id`, `DefParamClause`, `UsingParamClause` must be present
StructuralInstance ::= ConstrApp {‘with’ ConstrApp} ‘with’ TemplateBody
GivenDef ::= GivenAlias | GivenInstance | NamedInstance
GivenAlias ::= [GivenSig] AnnotType [‘=’ Expr]
GivenSig ::= [id] [GivenParams] ‘:’ -- one of `id`, `GivenParams` must be present
GivenParams ::= [DefTypeParamClause] {UsingParamClause} -- one of `DefParamClause`, `UsingParamClause` must be present
GivenInstance ::= ‘instance’ [GivenParams ‘extends’] ConstrApps [TemplateBody]
NamedInstance ::= id [GivenParams] ‘extends’ ConstrApps [TemplateBody]
Extension ::= ‘extension’ [DefTypeParamClause] ‘(’ DefParam ‘)’
{UsingParamClause}] ExtMethods
ExtMethods ::= ExtMethod | [nl] <<< ExtMethod {semi ExtMethod} >>>
Expand Down