'iterator' as type description
This commit is contained in:
parent
476f6fc8ee
commit
f610d2d221
2 changed files with 9 additions and 3 deletions
|
|
@ -70,7 +70,8 @@ exprOrType ::= lowestExpr
|
|||
| 'tuple' tupleDesc
|
||||
|
||||
expr ::= exprOrType
|
||||
| 'proc' paramList [pragma] ['=' stmt]
|
||||
| 'proc' paramList [pragma] ['=' stmt]
|
||||
| 'iterator' paramList [pragma] ['=' stmt]
|
||||
|
||||
exprList ::= [expr (comma expr)* [comma]]
|
||||
|
||||
|
|
@ -79,6 +80,7 @@ qualifiedIdent ::= symbol ['.' symbol]
|
|||
|
||||
typeDesc ::= exprOrType
|
||||
| 'proc' paramList [pragma]
|
||||
| 'iterator' paramList [pragma]
|
||||
|
||||
macroStmt ::= ':' [stmt] ('of' [exprList] ':' stmt
|
||||
|'elif' expr ':' stmt
|
||||
|
|
@ -146,7 +148,7 @@ param ::= symbol (comma symbol)* (':' typeDesc ['=' expr] | '=' expr)
|
|||
paramList ::= ['(' [param (comma|semicolon param)*] optPar ')'] [':' typeDesc]
|
||||
|
||||
genericConstraint ::= 'object' | 'tuple' | 'enum' | 'proc' | 'ref' | 'ptr'
|
||||
| 'var' | 'distinct' | primary
|
||||
| 'var' | 'distinct' | 'iterator' | primary
|
||||
genericConstraints ::= genericConstraint ( '|' optInd genericConstraint )*
|
||||
|
||||
genericParam ::= symbol [':' genericConstraints] ['=' expr]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue