diff --git a/compiler/parser.nim b/compiler/parser.nim index 7b6ef8ee56..0f52750c94 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -981,6 +981,7 @@ proc parseSymbolList(p: var TParser, result: PNode, allowNil = false) = proc parseTypeDescKAux(p: var TParser, kind: TNodeKind, mode: TPrimaryMode): PNode = + #| distinct = 'distinct' optInd typeDesc result = newNodeP(kind, p) getTok(p) optInd(p, result) diff --git a/doc/grammar.txt b/doc/grammar.txt index 61557b68c4..fe53418405 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -82,6 +82,7 @@ paramListColon = paramList? (':' optInd typeDesc)? doBlock = 'do' paramListArrow pragmas? colcom stmt doBlocks = doBlock ^* IND{=} procExpr = 'proc' paramListColon pragmas? ('=' COMMENT? stmt)? +distinct = 'distinct' optInd typeDesc expr = (ifExpr | whenExpr | caseExpr