type constraints; tuple lifting

This commit is contained in:
Araq
2011-04-01 00:26:07 +02:00
parent dc669155e3
commit 4d91c9d887
17 changed files with 527 additions and 139 deletions

View File

@@ -137,7 +137,11 @@ pragma ::= '{.' optInd (colonExpr [comma])* optPar ('.}' | '}')
param ::= symbol (comma symbol)* (':' typeDesc ['=' expr] | '=' expr)
paramList ::= ['(' [param (comma param)*] optPar ')'] [':' typeDesc]
genericParam ::= symbol [':' typeDesc] ['=' expr]
genericConstraint ::= 'object' | 'tuple' | 'enum' | 'proc' | 'ref' | 'ptr'
| 'var' | 'distinct' | primary
genericConstraints ::= genericConstraint ( '|' optInd genericConstraint )*
genericParam ::= symbol [':' genericConstraints] ['=' expr]
genericParams ::= '[' genericParam (comma genericParam)* optPar ']'