summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-09-10 16:43:46 +0800
committerGitHub <noreply@github.com>2023-09-10 10:43:46 +0200
commit2ce9197d3ad705b3abb5f40f0c27543d7bf03381 (patch)
tree836ed4e387bd97e71255dca50d35512e38076c65
parent8853fb07753756dbe29364e8a32081462367215d (diff)
downloadNim-2ce9197d3ad705b3abb5f40f0c27543d7bf03381.tar.gz
[minor] merge similar branches in vmgen (#22683)
-rw-r--r--compiler/vmgen.nim4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 16911e640..05c0d2a67 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -2232,8 +2232,6 @@ proc gen(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags = {}) =
   of nkVarSection, nkLetSection:
     unused(c, n, dest)
     genVarSection(c, n)
-  of declarativeDefs, nkMacroDef:
-    unused(c, n, dest)
   of nkLambdaKinds:
     #let s = n[namePos].sym
     #discard genProc(c, s)
@@ -2253,7 +2251,7 @@ proc gen(c: PCtx; n: PNode; dest: var TDest; flags: TGenFlags = {}) =
       dest = tmp0
   of nkEmpty, nkCommentStmt, nkTypeSection, nkConstSection, nkPragma,
      nkTemplateDef, nkIncludeStmt, nkImportStmt, nkFromStmt, nkExportStmt,
-     nkMixinStmt, nkBindStmt:
+     nkMixinStmt, nkBindStmt, declarativeDefs, nkMacroDef:
     unused(c, n, dest)
   of nkStringToCString, nkCStringToString:
     gen(c, n[0], dest)