Get symbol kind (#7491)

This commit is contained in:
Arne Döring 2018-04-11 16:48:01 +02:00 • committed by Andreas Rumpf
commit 6baca58693
13 changed files with 319 additions and 272 deletions

View file

@ -768,8 +768,10 @@ macro `=~`(x: PNode, pat: untyped): bool =
var conds = newTree(nnkBracket)
m(x, pat, conds)
when declared(macros.toNimIdent):
result = nestList(toNimIdent"and", conds)
when compiles(nestList(ident"and", conds)):
result = nestList(ident"and", conds)
#elif declared(macros.toNimIdent):
# result = nestList(toNimIdent"and", conds)
else:
result = nestList(!"and", conds)