C codegen: escape '?' because C has trigraphs
This commit is contained in:
parent
386efb464b
commit
e78bd69619
1 changed files with 1 additions and 1 deletions
|
|
@ -532,7 +532,7 @@ var
|
|||
proc toCChar*(c: char): string =
|
||||
case c
|
||||
of '\0'..'\x1F', '\x80'..'\xFF': result = '\\' & toOctal(c)
|
||||
of '\'', '\"', '\\': result = '\\' & c
|
||||
of '\'', '\"', '\\', '?': result = '\\' & c
|
||||
else: result = $(c)
|
||||
|
||||
proc makeCString*(s: string): Rope =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue