mirror of
https://github.com/ProgramSnail/Lama.git
synced 2026-01-01 11:38:20 +00:00
Better chars
This commit is contained in:
parent
cf2b696803
commit
27c091129a
4 changed files with 114 additions and 27 deletions
|
|
@ -589,8 +589,12 @@ class env prg =
|
|||
let rec iterate i =
|
||||
if i < n
|
||||
then (
|
||||
if x.[i] = '"' then Buffer.add_string buf "\\\""
|
||||
else Buffer.add_char buf x.[i];
|
||||
(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
|
||||
);
|
||||
iterate (i+1)
|
||||
)
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue