fix: Quote string literal in sexp

This commit is contained in:
Leni Aniva 2024-12-15 12:40:47 -08:00
parent 3744cfaa96
commit c0090dec97
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ partial def serializeExpressionSexp (expr: Expr) (sanitize: Bool := true): MetaM
-- is wrapped in a :lit sexp.
let v' := match v with
| .natVal val => toString val
| .strVal val => s!"\"{val}\""
| .strVal val => IR.EmitC.quoteString val
pure s!"(:lit {v'})"
| .mdata _ inner =>
-- NOTE: Equivalent to expr itself, but mdata influences the prettyprinter