fix #5918
This commit is contained in:
parent
43cac7f174
commit
4483cefa0c
2 changed files with 4 additions and 2 deletions
|
|
@ -297,7 +297,9 @@ proc describeArgs*(c: PContext, n: PNode, startIdx = 1;
|
||||||
n.sons[i].typ = arg.typ
|
n.sons[i].typ = arg.typ
|
||||||
n.sons[i].sons[1] = arg
|
n.sons[i].sons[1] = arg
|
||||||
else:
|
else:
|
||||||
if arg.typ.isNil and arg.kind notin {nkStmtList, nkDo}:
|
if arg.typ.isNil and arg.kind notin {nkStmtList, nkDo, nkElse,
|
||||||
|
nkOfBranch, nkElifBranch,
|
||||||
|
nkExceptBranch}:
|
||||||
arg = c.semOperand(c, n.sons[i])
|
arg = c.semOperand(c, n.sons[i])
|
||||||
n.sons[i] = arg
|
n.sons[i] = arg
|
||||||
if arg.typ != nil and arg.typ.kind == tyError: return
|
if arg.typ != nil and arg.typ.kind == tyError: return
|
||||||
|
|
|
||||||
|
|
@ -723,7 +723,7 @@ regular expressions:
|
||||||
|
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
|
|
||||||
macro case_token(n: typed): typed =
|
macro case_token(n: varargs[untyped]): typed =
|
||||||
# creates a lexical analyzer from regular expressions
|
# creates a lexical analyzer from regular expressions
|
||||||
# ... (implementation is an exercise for the reader :-)
|
# ... (implementation is an exercise for the reader :-)
|
||||||
discard
|
discard
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue