implemented user-defined pragmas
This commit is contained in:
parent
5a2163d71d
commit
804e2ac89d
11 changed files with 237 additions and 151 deletions
|
|
@ -51,6 +51,7 @@ type
|
|||
semExpr*: proc (c: PContext, n: PNode): PNode # for the pragmas
|
||||
includedFiles*: TIntSet # used to detect recursive include files
|
||||
filename*: string # the module's filename
|
||||
userPragmas*: TStrTable
|
||||
|
||||
|
||||
var gInstTypes*: TIdTable # map PType to PType
|
||||
|
|
@ -124,6 +125,7 @@ proc newContext(module: PSym, nimfile: string): PContext =
|
|||
result.converters = @ []
|
||||
result.filename = nimfile
|
||||
IntSetInit(result.includedFiles)
|
||||
initStrTable(result.userPragmas)
|
||||
|
||||
proc addConverter(c: PContext, conv: PSym) =
|
||||
var L = len(c.converters)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue