Nimscript: added support for 'patchFile'
This commit is contained in:
parent
66f37971e9
commit
5e82ffc8d5
7 changed files with 52 additions and 3 deletions
|
|
@ -13,7 +13,7 @@
|
|||
import
|
||||
ast, modules, passes, passaux, condsyms,
|
||||
options, nimconf, lists, sem, semdata, llstream, vm, vmdef, commands, msgs,
|
||||
os, times, osproc, wordrecg
|
||||
os, times, osproc, wordrecg, strtabs
|
||||
|
||||
# we support 'cmpIgnoreStyle' natively for efficiency:
|
||||
from strutils import cmpIgnoreStyle
|
||||
|
|
@ -122,6 +122,12 @@ proc setupVM*(module: PSym; scriptName: string): PEvalContext =
|
|||
cbconf warningImpl:
|
||||
processSpecificNote(a.getString 0, wWarning, passPP, unknownLineInfo(),
|
||||
a.getString 1)
|
||||
cbconf patchFile:
|
||||
let key = a.getString(0) & "_" & a.getString(1)
|
||||
var val = a.getString(2).addFileExt(NimExt)
|
||||
if not isAbsolute(val):
|
||||
val = vthisDir / val
|
||||
gModuleOverrides[key] = val
|
||||
|
||||
proc runNimScript*(scriptName: string; freshDefines=true) =
|
||||
passes.gIncludeFile = includeModule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue