mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: do not use L'x' for ASCII values (enable compilation with simpler C compilers)
This commit is contained in:
parent
9fa805cbbf
commit
1305ca662f
@ -3100,7 +3100,11 @@ fn (mut g Gen) expr(node ast.Expr) {
|
||||
if node.val == r'\`' {
|
||||
g.write("'`'")
|
||||
} else {
|
||||
g.write("L'$node.val'")
|
||||
if utf8_str_len(node.val) < node.val.len {
|
||||
g.write("L'$node.val'")
|
||||
} else {
|
||||
g.write("'$node.val'")
|
||||
}
|
||||
}
|
||||
}
|
||||
ast.DumpExpr {
|
||||
|
Loading…
Reference in New Issue
Block a user