From f610d2d2217b757901929ed92725a1b682e1165c Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 22 Nov 2012 08:31:40 +0100 Subject: 'iterator' as type description --- doc/grammar.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/grammar.txt') diff --git a/doc/grammar.txt b/doc/grammar.txt index 1e54d1116..2474b584e 100755 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -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] -- cgit 1.4.1-2-gfad0