Ignore #pragma in preprocessor output
This commit is contained in:
parent
eb3a2d3bfd
commit
bbe58407cf
1 changed files with 2 additions and 1 deletions
|
|
@ -94,6 +94,7 @@ proc savefile(file: string) =
|
|||
FILES.del(file)
|
||||
except:
|
||||
echo "Failed to save " & file
|
||||
echo getCurrentExceptionMsg()
|
||||
|
||||
proc savefiles() =
|
||||
for file in FILES.keys():
|
||||
|
|
@ -195,7 +196,7 @@ proc preprocess(file: string): string =
|
|||
let sfile = file.replace("\\", "/")
|
||||
for line in data.splitLines():
|
||||
if line.strip() != "":
|
||||
if line[0] == '#':
|
||||
if line[0] == '#' and not line.contains("#pragma"):
|
||||
start = false
|
||||
if sfile in line.replace("\\", "/").replace("//", "/"):
|
||||
start = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue