next steps to hygienic templates
This commit is contained in:
parent
5e15dec175
commit
da190876de
17 changed files with 97 additions and 76 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue