next steps to hygienic templates

This commit is contained in:
Araq 2012-08-20 08:44:17 +02:00
commit da190876de
17 changed files with 97 additions and 76 deletions

View file

@ -11,7 +11,7 @@
import idents, strutils, os, options
var gFrontEndId, gBackendId*, genSymBaseId*: int
var gFrontEndId, gBackendId*: int
const
debugIds* = false
@ -34,9 +34,6 @@ proc backendId*(): int {.inline.} =
result = gBackendId
inc(gBackendId)
proc genSym*(basename: string): PIdent =
result = getIdent(basename & $genSymBaseId)
proc setId*(id: int) {.inline.} =
gFrontEndId = max(gFrontEndId, id + 1)
@ -66,4 +63,3 @@ proc loadMaxIds*(project: string) =
gFrontEndId = max(gFrontEndId, frontEndId)
gBackEndId = max(gBackEndId, backEndId)
f.close()