This commit is contained in:
Edgar 2023-06-15 08:00:16 +02:00
parent 912419fe23
commit aef84e9d45
No known key found for this signature in database
GPG key ID: 70ADAE8F35904387
2 changed files with 7 additions and 6 deletions

4
programs/std.ed Normal file
View file

@ -0,0 +1,4 @@
struct String {
}

View file

@ -547,13 +547,10 @@ impl<'ctx> CodeGen<'ctx> {
pub fn compile_literal(&self, term: &LiteralValue) -> Result<BasicValueEnum<'ctx>> {
let value = match term {
LiteralValue::String(_s) => {
LiteralValue::String(s) => {
// todo: search string folding and interning.
// self.builder.build_global_string_ptr(s, "literal_str");
todo!()
/*
self
.context
.const_string(s.as_bytes(), true)
.as_basic_value_enum() */
}
LiteralValue::Boolean(v) => self
.context