diff options
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r-- | compiler/ast.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index 18b6e6b37..b327218a1 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -1298,6 +1298,12 @@ proc initIdTable(x: var TIdTable) = x.counter = 0 newSeq(x.data, StartSize) +proc resetIdTable*(x: var TIdTable) = + x.counter = 0 + # clear and set to old initial size: + setLen(x.data, 0) + setLen(x.data, StartSize) + proc initObjectSet(x: var TObjectSet) = x.counter = 0 newSeq(x.data, StartSize) |