Fix missing array type, suppress gcc warnings
This commit is contained in:
parent
75dc6dc56e
commit
04d01a5f6e
2 changed files with 5 additions and 3 deletions
|
|
@ -129,7 +129,7 @@ proc removeStatic*(content: string): string =
|
|||
proc getPreprocessor*(fullpath: string, mode = "cpp"): string =
|
||||
var
|
||||
mmode = if mode == "cpp": "c++" else: mode
|
||||
cmd = &"gcc -E -dD -x{mmode} "
|
||||
cmd = &"gcc -E -dD -x{mmode} -w "
|
||||
|
||||
rdata: seq[string] = @[]
|
||||
start = false
|
||||
|
|
@ -144,7 +144,7 @@ proc getPreprocessor*(fullpath: string, mode = "cpp"): string =
|
|||
cmd &= &"\"{fullpath}\""
|
||||
|
||||
# Include content only from file
|
||||
for line in execAction(cmd, true).splitLines():
|
||||
for line in execAction(cmd).splitLines():
|
||||
if line.strip() != "":
|
||||
if line.len > 1 and line[0 .. 1] == "# ":
|
||||
start = false
|
||||
|
|
|
|||
|
|
@ -267,7 +267,9 @@ proc initGrammar() =
|
|||
var
|
||||
offset = 0
|
||||
|
||||
if gStateRT.data[0].name == "type_identifier":
|
||||
if gStateRT.data.len > 1 and
|
||||
gStateRT.data[0].name == "type_identifier" and
|
||||
gStateRT.data[1].name != "field_identifier":
|
||||
offset = 1
|
||||
|
||||
pStructCommon(ast, node, gStateRT.data[^1].val, offset, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue