aboutsummaryrefslogtreecommitdiff
path: root/nimgen.nim
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2018-03-13 17:05:40 -0500
committerGanesh Viswanathan <dev@genotrance.com>2018-03-13 17:05:40 -0500
commit6d0abefe8a3c3bb060941cd664fc66dc3cefbd21 (patch)
treed8bff993aae18435c6a2368d4857c86ac2b9c596 /nimgen.nim
parentfec0e49fac30a7bde7a5c35920b10aab0af6b62d (diff)
downloadnimgen-0.1.5.tar.gz
nimgen-0.1.5.zip
Minor bugfixesv0.1.5
Diffstat (limited to 'nimgen.nim')
-rw-r--r--nimgen.nim9
1 files changed, 6 insertions, 3 deletions
diff --git a/nimgen.nim b/nimgen.nim
index fc70cc2..c48fdde 100644
--- a/nimgen.nim
+++ b/nimgen.nim
@@ -283,7 +283,8 @@ proc getIncls(file: string, inline=false): seq[string] =
for f in content.findIter(re"(?m)^\s*#\s*include\s+(.*?)$"):
var inc = f.captures[0].strip()
if ((QUOTES and inc.contains("\"")) or (FILTER != "" and FILTER in inc)) and (not exclude(inc)):
- result.add(inc.replace(re"""[<>"]""", "").strip())
+ result.add(
+ inc.replace(re"""[<>"]""", "").replace(re"\/[\*\/].*$", "").strip())
result = result.deduplicate()
@@ -337,6 +338,8 @@ proc runPreprocess(file, ppflags, flags: string, inline: bool): string =
start = false
if sfile in line.replace("\\", "/").replace("//", "/"):
start = true
+ if not ("\\" in line) and not ("/" in line) and extractFilename(sfile) in line:
+ start = true
else:
if start:
rdata.add(
@@ -641,9 +644,9 @@ proc runCfg(cfg: string) =
let (key, val) = getKey(wild)
if val == true:
if key == "wildcard":
- wildcard = CONFIG["n.wildcard"][key]
+ wildcard = CONFIG["n.wildcard"][wild]
else:
- WILDCARDS.setSectionKey(wildcard, key, CONFIG["n.wildcard"][key])
+ WILDCARDS.setSectionKey(wildcard, wild, CONFIG["n.wildcard"][wild])
for file in CONFIG.keys():
if file in @["n.global", "n.include", "n.exclude", "n.prepare", "n.wildcard"]: