summaryrefslogtreecommitdiff
path: root/tnslc/parse/tokenizer.tnsl
diff options
context:
space:
mode:
Diffstat (limited to 'tnslc/parse/tokenizer.tnsl')
-rw-r--r--tnslc/parse/tokenizer.tnsl16
1 files changed, 10 insertions, 6 deletions
diff --git a/tnslc/parse/tokenizer.tnsl b/tnslc/parse/tokenizer.tnsl
index d78fa40..745100c 100644
--- a/tnslc/parse/tokenizer.tnsl
+++ b/tnslc/parse/tokenizer.tnsl
@@ -404,16 +404,20 @@ uint MAX_MULTI = 3
;/
+/; print_token (Token t)
+ _printf("Token {\0")
+ _printf(t.data)
+ _print_num(", line: %u\0", t.line)
+ _print_num(", col: %u, type: \0", t.col)
+ print_token_type(t)
+ _printf("}\n\0")
+;/
+
/; print_token_list (~utils.Vector vec)
~Token tok
/; loop (uint i = 0; i < vec`.count) [i++]
tok = vec.get(i)
- _printf("Token {\0")
- _printf(tok`.data)
- _print_num(", line: %u\0", tok`.line)
- _print_num(", col: %u, type: \0", tok`.col)
- print_token_type(tok`)
- _printf("}\n\0")
+ print_token(tok`)
;/
;/