diff options
author | solo989 <solo989@yahoo.com> | 2020-06-16 22:57:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 07:57:04 +0200 |
commit | bdd2c25e9f97e8b92d6445417dd70450123a79fe (patch) | |
tree | a27ba92641e4b02ec82fe47e6aef957c38f10480 /lib | |
parent | ff93302f69c724bc03d7e0529fb0b9b6bfa0b36e (diff) | |
download | Nim-bdd2c25e9f97e8b92d6445417dd70450123a79fe.tar.gz |
Update macros.nim (#14697)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/macros.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 27ff063a7..aa4269101 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -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 ## ``ident(string)``. Use that, it's shorter. +proc ident*(name: string): NimNode {.magic: "StrToIdent", noSideEffect.} + ## Create a new ident node from a string. type BindSymRule* = enum ## specifies how ``bindSym`` behaves @@ -1283,9 +1285,6 @@ proc `$`*(node: NimNode): string {.compileTime.} = else: badNodeKind node, "$" -proc ident*(name: string): NimNode {.magic: "StrToIdent", noSideEffect.} - ## Create a new ident node from a string. - iterator items*(n: NimNode): NimNode {.inline.} = ## Iterates over the children of the NimNode ``n``. for i in 0 ..< n.len: |