add copying token value and add Boehm GC ready for runtime implimentation

This commit is contained in:
2025-05-29 00:40:11 +01:00
parent b82e351daf
commit 626445a906
7 changed files with 67 additions and 10 deletions

View File

@@ -1,5 +1,4 @@
#include "string.h"
#include "../../string/string.h"
#include "../../lexer/token.h"
#include <cjson/cJSON.h>
@@ -27,7 +26,6 @@ char *swap_quotes(char *input) {
}
char *unquote(char *str) {
return str;
if (*str == '\0')
return NULL;
@@ -76,6 +74,6 @@ char *unquote(char *str) {
TaggedValue parse_string(Token token) {
return (TaggedValue){
AST_STRING,
cloneString(token.value),
unquote(token.value),
};
}