diff --git a/doc/astspec.txt b/doc/astspec.txt index 45533c7d6f4..3ff99540b5f 100644 --- a/doc/astspec.txt +++ b/doc/astspec.txt @@ -22,7 +22,7 @@ contains: NimNode = ref NimNodeObj NimNodeObj = object case kind: NimNodeKind ## the node's kind - of nnkEmpty, nnkNilLit: + of nnkError, nnkEmpty, nnkNilLit: discard ## node contains no additional fields of nnkCharLit..nnkUInt64Lit: intVal: BiggestInt ## the int literal diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 6bd6e58812b..40d9efba1ff 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -48,8 +48,7 @@ template skipEnumValue(define: untyped, predecessor: untyped; gap = 1): untyped type NimNodeKind* = enum nnkError, ## erroneous AST node - nnkEmpty, - nnkIdent, nnkSym, + nnkEmpty, nnkIdent, nnkSym, nnkType, nnkCharLit, nnkIntLit, nnkInt8Lit, nnkInt16Lit, nnkInt32Lit, nnkInt64Lit, nnkUIntLit, nnkUInt8Lit, nnkUInt16Lit, nnkUInt32Lit, nnkUInt64Lit, nnkFloatLit, diff --git a/tests/lang_stmts/defer/tdefer_malformed_many_children.nim b/tests/lang_stmts/defer/tdefer_malformed_many_children.nim index e0217bd0517..9e9c9d8ebf3 100644 --- a/tests/lang_stmts/defer/tdefer_malformed_many_children.nim +++ b/tests/lang_stmts/defer/tdefer_malformed_many_children.nim @@ -2,7 +2,7 @@ discard """ description: "`defer` must have exactly one child node (macro input)." errormsg: "illformed AST" file: "macros.nim" - line: 619 + line: 618 """ import std/macros