Update macros.nim (#14697)

This commit is contained in:
solo989 2020-06-16 22:57:04 -07:00 • committed by GitHub
commit bdd2c25e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -466,6 +466,8 @@ proc newIdentNode*(i: string): NimNode {.magic: "StrToIdent", noSideEffect, comp
## Creates an identifier node from `i`. It is simply an alias for ## Creates an identifier node from `i`. It is simply an alias for
## ``ident(string)``. Use that, it's shorter. ## ``ident(string)``. Use that, it's shorter.
proc ident*(name: string): NimNode {.magic: "StrToIdent", noSideEffect.}
## Create a new ident node from a string.
type type
BindSymRule* = enum ## specifies how ``bindSym`` behaves BindSymRule* = enum ## specifies how ``bindSym`` behaves
@ -1283,9 +1285,6 @@ proc `$`*(node: NimNode): string {.compileTime.} =
else: else:
badNodeKind node, "$" badNodeKind node, "$"
proc ident*(name: string): NimNode {.magic: "StrToIdent", noSideEffect.}
## Create a new ident node from a string.
iterator items*(n: NimNode): NimNode {.inline.} = iterator items*(n: NimNode): NimNode {.inline.} =
## Iterates over the children of the NimNode ``n``. ## Iterates over the children of the NimNode ``n``.
for i in 0 ..< n.len: for i in 0 ..< n.len: