fix: Quote string literal in sexp
This commit is contained in:
parent
3744cfaa96
commit
c0090dec97
|
@ -369,7 +369,7 @@ partial def serializeExpressionSexp (expr: Expr) (sanitize: Bool := true): MetaM
|
||||||
-- is wrapped in a :lit sexp.
|
-- is wrapped in a :lit sexp.
|
||||||
let v' := match v with
|
let v' := match v with
|
||||||
| .natVal val => toString val
|
| .natVal val => toString val
|
||||||
| .strVal val => s!"\"{val}\""
|
| .strVal val => IR.EmitC.quoteString val
|
||||||
pure s!"(:lit {v'})"
|
pure s!"(:lit {v'})"
|
||||||
| .mdata _ inner =>
|
| .mdata _ inner =>
|
||||||
-- NOTE: Equivalent to expr itself, but mdata influences the prettyprinter
|
-- NOTE: Equivalent to expr itself, but mdata influences the prettyprinter
|
||||||
|
|
Loading…
Reference in New Issue