`do' keyword in the grammar for lambda blocks

This commit is contained in:
Zahary Karadjov 2012-02-10 14:50:06 +02:00
commit 560a3bad28
14 changed files with 83 additions and 36 deletions

View file

@ -244,9 +244,9 @@ proc semGenericStmt(c: PContext, n: PNode,
for j in countup(0, L-3):
addPrelimDecl(c, newSymS(skUnknown, getIdentNode(a.sons[j]), c))
of nkProcDef, nkMethodDef, nkConverterDef, nkMacroDef, nkTemplateDef,
nkIteratorDef, nkLambda:
nkIteratorDef, nkLambdaKinds:
checkSonsLen(n, bodyPos + 1)
if n.kind != nkLambda:
if n.kind notin nkLambdaKinds:
addPrelimDecl(c, newSymS(skUnknown, getIdentNode(n.sons[0]), c))
openScope(c.tab)
n.sons[genericParamsPos] = semGenericStmt(c, n.sons[genericParamsPos],