fix: print for string literal
This commit is contained in:
parent
a172998954
commit
7d736e63b1
1 changed files with 5 additions and 2 deletions
|
|
@ -280,8 +280,11 @@ struct print_expr_fn {
|
|||
case expr_kind::Lit:
|
||||
switch (lit_value(a).kind()) {
|
||||
case literal_kind::Nat: out() << lit_value(a).get_nat().to_mpz(); break;
|
||||
case literal_kind::String: out() << escaped(lit_value(a).get_string().data()); break; // HACK Lean string as C string
|
||||
}
|
||||
case literal_kind::String: {
|
||||
std::string val(lit_value(a).get_string().data() + 1);
|
||||
val.pop_back();
|
||||
out() << "\"" << escaped(val.c_str()) << "\""; break; // HACK Lean string as C string
|
||||
}}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue