Fix character value handling. String stuff appears to work correctly in bytecode now

This commit is contained in:
Nathan Braswell
2018-03-22 00:51:57 -04:00
parent c056af6e56
commit b8213dfc9f
4 changed files with 12 additions and 2 deletions

View File

@@ -291,6 +291,8 @@ obj c_generator (Object) {
}
fun generate_value(node: *ast_node): string {
var value = node->value.string_value
if (node->value.value_type->base == base_type::character() && node->value.value_type->indirection == 0)
return "'" + value + "'"
if (node->value.value_type->base != base_type::character() || node->value.value_type->indirection != 1)
return value