mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 09:59:29 +00:00
Add #set to define preprocessors constants from an imported file
This commit is contained in:
parent
d4102f1af6
commit
53f715cc6f
2 changed files with 177 additions and 357 deletions
|
|
@ -184,6 +184,10 @@ function candran.preprocess(input, options={})
|
|||
error("invalid macro type %s":format(tostring(iast.tag)))
|
||||
end
|
||||
end
|
||||
env.set = function(identifier, value)
|
||||
options.preprocessorEnv[identifier] = value
|
||||
env[identifier] = value
|
||||
end
|
||||
|
||||
-- default macros
|
||||
if options.builtInMacros then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue