mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-07 23:38:47 +00:00
Modified escaping for llvm assembly
This commit is contained in:
parent
60f1f7d024
commit
670bb2d242
1 changed files with 6 additions and 5 deletions
11
src/X86.ml
11
src/X86.ml
|
|
@ -1156,11 +1156,12 @@ class env prg =
|
|||
let buf = Buffer.create (n * 2) in
|
||||
let rec iterate i =
|
||||
if i < n then (
|
||||
(match x.[i] with
|
||||
| '"' -> Buffer.add_string buf "\\\""
|
||||
| '\n' -> Buffer.add_string buf "\n"
|
||||
| '\t' -> Buffer.add_string buf "\t"
|
||||
| c -> Buffer.add_char buf c);
|
||||
match x.[i] with
|
||||
| '"' -> Buffer.add_string buf "\\\""
|
||||
| '\n' -> Buffer.add_string buf "\\n"
|
||||
| '\t' -> Buffer.add_string buf "\\t"
|
||||
| '\\' -> Buffer.add_string buf "\\\\"
|
||||
| c -> Buffer.add_char buf c;
|
||||
iterate (i + 1))
|
||||
in
|
||||
iterate 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue