diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-06-25 00:20:04 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-06-25 00:20:04 -0400 |
commit | 0b0659ec65c8167548c3f32707b5bde249d6a458 (patch) | |
tree | b6ca9f1edad571637ce02d77d734f94fbe95345a | |
parent | 1e408524f0371ea286ce93a087e3dd5d0f9fd4af (diff) |
Fix inline string literals in modules
-rw-r--r-- | compiler.c | 2 | ||||
-rw-r--r-- | tests/Makefile | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -4854,7 +4854,7 @@ Variable _eval_literal(Scope *s, CompData *data, Vector *tokens, size_t literal) vect_push_string(&data->data, "#ptr\n\n"); out = var_init(label, typ_get_inbuilt("uint8")); - out.mod = s->current; + out.mod = NULL; out.location = LOC_DATA; free(label); int arr_t = PTYPE_ARR; diff --git a/tests/Makefile b/tests/Makefile index 909b750..4365af7 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,9 +7,12 @@ src_files := $(wildcard *.tnsl) obj_files := $(src_files:.tnsl=.o) out_files := $(src_files:.tnsl=.out) -.PHONY: all outdir clean +.PHONY: all run outdir clean all: outdir $(out_files) +run: all + ./run.sh + %.asm: %.tnsl @../ctc $< $(obj_dir)/$@ |