diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2017-11-07 23:13:16 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2017-11-07 23:13:16 -0600 |
| commit | bbe58407cfc9dba26db7a398bb6af3207222843e (patch) | |
| tree | d755cc7d95c06eb5ed77bd5940307ea8b21a3314 | |
| parent | eb3a2d3bfde842d3edf1d571ec64df6f77159828 (diff) | |
| download | nimgen-bbe58407cfc9dba26db7a398bb6af3207222843e.tar.gz nimgen-bbe58407cfc9dba26db7a398bb6af3207222843e.zip | |
Ignore #pragma in preprocessor output
| -rw-r--r-- | nimgen.nim | 3 |
1 files changed, 2 insertions, 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 |
