Remove preprocessor file lines, clean whitespace in types

This commit is contained in:
Ganesh Viswanathan 2019-01-31 22:10:43 -06:00
commit d6932247a9
2 changed files with 2 additions and 3 deletions

View file

@ -458,5 +458,5 @@ macro cImport*(filename: static string, recurse: static bool = false): untyped =
except:
let
(tmpFile, errors) = getNimCheckError(output)
doAssert false, errors & "Nimterop codegen limitation or error - review 'nim check' output above generated for " & tmpFile
doAssert false, errors & "\n\nNimterop codegen limitation or error - review 'nim check' output above generated for " & tmpFile

View file

@ -81,6 +81,7 @@ proc getType*(str: string): string =
return "object"
result = str.strip(chars={'_'}).
replace(re"\s+", " ").
replace(re"([u]?int[\d]+)_t", "$1").
replace(re"([u]?int)ptr_t", "ptr $1")
@ -232,8 +233,6 @@ proc getPreprocessor*(fullpath: string, mode = "cpp"): string =
if inc.absolutePath().sanitizePath in saniLine:
start = true
break
if start:
rdata.add(&"// {line}")
else:
if start:
if "#undef" in line: