summaryrefslogtreecommitdiff
path: root/tnslc/vector.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-08-10 18:29:59 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-08-10 18:29:59 -0400
commit0cc237617e4e853520b0509c02408d4170572d28 (patch)
tree3714eb635f6c9cc12ba064f3281d867ac4ffba31 /tnslc/vector.tnsl
parent9ab49df341025eca8e641ee539355edb15e0fff2 (diff)
Re-implement tokenizer functionality
Diffstat (limited to 'tnslc/vector.tnsl')
-rw-r--r--tnslc/vector.tnsl7
1 files changed, 7 insertions, 0 deletions
diff --git a/tnslc/vector.tnsl b/tnslc/vector.tnsl
index 87a49e9..73580e0 100644
--- a/tnslc/vector.tnsl
+++ b/tnslc/vector.tnsl
@@ -71,6 +71,13 @@ struct Vector {
;/
;/
+ # [UNSAFE] ONLY USE FOR STRING VECTORS
+ /; add_str (~uint8 dat)
+ /; loop (int i = 0; dat{i} !== 0)
+ self.push(dat + i)
+ ;/
+ ;/
+
/; start (int el_size)
self.num_el = 0
self.el_size = el_size