Skip to content

Commit 1720bae

Browse files
committed
fix for bootstrap: cannot insert in NimNodeKind except at the end
1 parent 0011cc0 commit 1720bae

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler/ast.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ type
157157
nkTypeSection, # a type section (consists of type definitions)
158158
nkVarSection, # a var section
159159
nkLetSection, # a let section
160-
nkCustomDefSection, # a custom definition section, eg `byAddr foo = bar`
161160
nkConstSection, # a const section
162161
nkConstDef, # a const definition
163162
nkTypeDef, # a type definition
@@ -225,6 +224,7 @@ type
225224
nkBreakState, # special break statement for easier code generation
226225
nkFuncDef, # a func
227226
nkTupleConstr # a tuple constructor
227+
nkCustomDefSection, # a custom definition section, eg `byAddr foo = bar`
228228

229229
TNodeKinds* = set[TNodeKind]
230230

lib/core/macros.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type
5151
nnkElifBranch, nnkExceptBranch, nnkElse,
5252
nnkAsmStmt, nnkPragma, nnkPragmaBlock, nnkIfStmt, nnkWhenStmt,
5353
nnkForStmt, nnkParForStmt, nnkWhileStmt, nnkCaseStmt,
54-
nnkTypeSection, nnkVarSection, nnkLetSection, nnkCustomDefSection, nnkConstSection,
54+
nnkTypeSection, nnkVarSection, nnkLetSection, nnkConstSection,
5555
nnkConstDef, nnkTypeDef,
5656
nnkYieldStmt, nnkDefer, nnkTryStmt, nnkFinally, nnkRaiseStmt,
5757
nnkReturnStmt, nnkBreakStmt, nnkContinueStmt, nnkBlockStmt, nnkStaticStmt,
@@ -84,7 +84,8 @@ type
8484
nnkState,
8585
nnkBreakState,
8686
nnkFuncDef,
87-
nnkTupleConstr
87+
nnkTupleConstr,
88+
nnkCustomDefSection,
8889

8990
NimNodeKinds* = set[NimNodeKind]
9091
NimTypeKind* = enum # some types are no longer used, see ast.nim

0 commit comments

Comments
 (0)