summaryrefslogtreecommitdiff
path: root/tnslc/parse/parse.tnsl
diff options
context:
space:
mode:
Diffstat (limited to 'tnslc/parse/parse.tnsl')
-rw-r--r--tnslc/parse/parse.tnsl17
1 files changed, 14 insertions, 3 deletions
diff --git a/tnslc/parse/parse.tnsl b/tnslc/parse/parse.tnsl
index ec65f7b..4983e13 100644
--- a/tnslc/parse/parse.tnsl
+++ b/tnslc/parse/parse.tnsl
@@ -15,6 +15,17 @@
#/
/; module parse
- :include "tnslc/parse/token.tnsl"
- :include "tnslc/parse/tokenizer.tnsl"
-;/ \ No newline at end of file
+ :include "parse/token.tnsl"
+ :include "parse/tokenizer.tnsl"
+;/
+
+/; print_tokens(~{}parse.Token dat)
+ /;loop (int i = 0; i < len dat`) [i++]
+ ;tnsl.io.print("{ ")
+ ;tnsl.io.print(dat`{i}.token_type)
+ ;tnsl.io.print(" ")
+ ;tnsl.io.print(dat`{i}.data`)
+ ;tnsl.io.print(" } ")
+ ;/
+ ;tnsl.io.print("\n")
+;/