Add the ability to pass a value with the -d flag
This allows the end user to use the {.magic: "IntDefine"/"StrDefine"}
pragmas to pass values into code at compile time. This has a nice side
effect of also allowing/requiring a default value to be assigned in the
code (see osalloc.nim/StandaloneHeapSize for an example)
This commit is contained in:
parent
38de553b86
commit
94d1aa5109
7 changed files with 32 additions and 7 deletions
|
|
@ -36,6 +36,7 @@ type
|
|||
wColon, wColonColon, wEquals, wDot, wDotDot,
|
||||
wStar, wMinus,
|
||||
wMagic, wThread, wFinal, wProfiler, wObjChecks,
|
||||
wIntDefine, wStrDefine,
|
||||
|
||||
wDestroy,
|
||||
|
||||
|
|
@ -121,7 +122,7 @@ const
|
|||
|
||||
":", "::", "=", ".", "..",
|
||||
"*", "-",
|
||||
"magic", "thread", "final", "profiler", "objchecks",
|
||||
"magic", "thread", "final", "profiler", "objchecks", "intdefine", "strdefine",
|
||||
|
||||
"destroy",
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue