summaryrefslogtreecommitdiff
path: root/src/lib/syntax.c
diff options
context:
space:
mode:
authorpeter <peter@pmikkelsen.com>2026-08-25 21:07:11 +0000
committerpeter <peter@pmikkelsen.com>2026-08-25 21:07:11 +0000
commit3787b5c0b7870eec43ce384beaa16288073e89cf (patch)
tree5bab512957d84a40ac31fe9725adf8ddedda392d /src/lib/syntax.c
parent86a65e695b9dc1fb7a20094204339f5bf168fb92 (diff)
Add a reference to the original string, in a token_list. Otherwise the offsets make no sense.
FossilOrigin-Name: 22c37facb5cb33fac6f473425f5552491da19ae280edcfd8e93f157870f9746e
Diffstat (limited to 'src/lib/syntax.c')
-rw-r--r--src/lib/syntax.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/syntax.c b/src/lib/syntax.c
index f930973..89f8be4 100644
--- a/src/lib/syntax.c
+++ b/src/lib/syntax.c
@@ -247,6 +247,7 @@ scan_string(struct aplwc *aplwc, struct string *text, int oneline)
aplwc->last_error = APLWC_OUT_OF_MEMORY;
return NULL;
}
+ tokens->text = text;
tokens->length = n;
scan(text, tokens);