Minimal build of the refstrings in the literal structure

This commit is contained in:
2022-11-23 12:52:49 +00:00
parent c7465e1204
commit 923cf70c06
21 changed files with 186 additions and 75 deletions

View File

@@ -29,22 +29,18 @@ int main() {
{
//test string literals
char* buffer = ALLOCATE(char, 128);
char* buffer = "Hello world";
snprintf(buffer, 128, "Hello world");
Literal literal = TO_STRING_LITERAL(buffer, 128);
Literal literal = TO_STRING_LITERAL(createRefString(buffer));
freeLiteral(literal);
}
{
//test identifier literals
char* buffer = ALLOCATE(char, 128);
char buffer[] = "Hello world";
snprintf(buffer, 128, "foobar");
Literal literal = TO_IDENTIFIER_LITERAL(buffer, 128);
Literal literal = TO_IDENTIFIER_LITERAL(createRefString(buffer));
freeLiteral(literal);
}