diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-12-12 16:29:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 16:29:46 +0100 |
commit | a1bf9fd2b6525e613899c5dc0380fb80021ee3e7 (patch) | |
tree | d2bdb332c973d2f6d43391369229cc732642c74d /compiler/ast.nim | |
parent | a38f35359738534ba856d02f3564d5fbc2dfc822 (diff) | |
parent | 070bcf4cea28a3238089379f5884787b2084b2de (diff) | |
download | Nim-a1bf9fd2b6525e613899c5dc0380fb80021ee3e7.tar.gz |
Merge branch 'devel' into sorted_deduplicate
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r-- | compiler/ast.nim | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index 40a05e6bf..5f5f296cb 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -723,10 +723,9 @@ type sons*: TNodeSeq comment*: string - TSymSeq* = seq[PSym] TStrTable* = object # a table[PIdent] of PSym counter*: int - data*: TSymSeq + data*: seq[PSym] # -------------- backend information ------------------------------- TLocKind* = enum @@ -1087,9 +1086,6 @@ proc newSym*(symKind: TSymKind, name: PIdent, owner: PSym, result.id = getID() when debugIds: registerId(result) - #if result.id == 77131: - # writeStacktrace() - # echo name.s proc isMetaType*(t: PType): bool = return t.kind in tyMetaTypes or @@ -1261,6 +1257,9 @@ proc `$`*(x: TLockLevel): string = elif x.ord == UnknownLockLevel.ord: result = "<unknown>" else: result = $int16(x) +proc `$`*(s: PSym): string = + result = s.name.s & "@" & $s.id + proc newType*(kind: TTypeKind, owner: PSym): PType = new(result) result.kind = kind |