Fix codegen for escaped args

This commit is contained in:
Dominic Grimm 2022-09-10 10:28:15 +02:00
parent 30b608e5aa
commit 783ba9fce0
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ pub enum Arg {
impl assembler::ToCode for Arg {
fn to_code(&self) -> String {
match self {
Arg::Char(x) => format!("'{}'", x),
Arg::String(x) => format!("\"{}\"", x),
Arg::Char(x) => format!("'{}'", x.escape_default()),
Arg::String(x) => format!("\"{}\"", x.escape_default()),
Arg::Number(x) => x.to_string(),
Arg::Variable(x) => x.clone(),
Arg::BinaryExpression { left, right, op } => {