added nkError to the AST (#17567)
* added nkError to the AST * Update lib/core/macros.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update compiler/ast.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
This commit is contained in:
parent
1a407402a4
commit
cfff27529e
6 changed files with 90 additions and 3 deletions
|
|
@ -10,7 +10,7 @@
|
|||
import
|
||||
intsets, ast, astalgo, msgs, renderer, magicsys, types, idents, trees,
|
||||
wordrecg, strutils, options, guards, lineinfos, semfold, semdata,
|
||||
modulegraphs, varpartitions, typeallowed, nilcheck
|
||||
modulegraphs, varpartitions, typeallowed, nilcheck, errorhandling
|
||||
|
||||
when defined(useDfa):
|
||||
import dfa
|
||||
|
|
@ -1136,6 +1136,8 @@ proc track(tracked: PEffects, n: PNode) =
|
|||
dec tracked.leftPartOfAsgn
|
||||
for i in 1 ..< n.len: track(tracked, n[i])
|
||||
inc tracked.leftPartOfAsgn
|
||||
of nkError:
|
||||
localError(tracked.config, n.info, errorToString(tracked.config, n))
|
||||
else:
|
||||
for i in 0..<n.safeLen: track(tracked, n[i])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue