summary refs log tree commit diff stats
path: root/compiler/parser.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2018-10-29 15:33:56 +0000
committerAndreas Rumpf <rumpf_a@web.de>2018-10-29 16:33:56 +0100
commit8d9866a6d46acfd17e273c1906c705c7d96a4b73 (patch)
treedeff39f63cd2401411badac9e38c2181ca05db1b /compiler/parser.nim
parente44df5dca6b58d4de07fb040d6587a5a1570b3d0 (diff)
downloadNim-8d9866a6d46acfd17e273c1906c705c7d96a4b73.tar.gz
Maps `out` keyword to an nnkIdent. Fixes #6011. (#9536)
Diffstat (limited to 'compiler/parser.nim')
-rw-r--r--compiler/parser.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index 61736c923..02083ca83 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -602,7 +602,7 @@ proc identOrLiteral(p: var TParser, mode: TPrimaryMode): PNode =
   #| tupleConstr = '(' optInd (exprColonEqExpr comma?)* optPar ')'
   #| arrayConstr = '[' optInd (exprColonEqExpr comma?)* optPar ']'
   case p.tok.tokType
-  of tkSymbol, tkBuiltInMagics:
+  of tkSymbol, tkBuiltInMagics, tkOut:
     result = newIdentNodeP(p.tok.ident, p)
     getTok(p)
     result = parseGStrLit(p, result)
@@ -1246,7 +1246,6 @@ proc primary(p: var TParser, mode: TPrimaryMode): PNode =
     optInd(p, result)
     addSon(result, primary(p, pmNormal))
   of tkVar: result = parseTypeDescKAux(p, nkVarTy, mode)
-  of tkOut: result = parseTypeDescKAux(p, nkVarTy, mode)
   of tkRef: result = parseTypeDescKAux(p, nkRefTy, mode)
   of tkPtr: result = parseTypeDescKAux(p, nkPtrTy, mode)
   of tkDistinct: result = parseTypeDescKAux(p, nkDistinctTy, mode)