From 46aa6b65376ea62deb1d5ea1611b59dc222a5141 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 2 May 2022 02:57:49 -0400 Subject: [TNSLC] AST Updates - Change how string_equate works - Call AST Node generator from main - Flush out ast.tnsl - Add a few initial methods to AST - Move some code from token.tnsl to parse.tnsl --- tnslc/tnslc.tnsl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tnslc/tnslc.tnsl') diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl index d8adc24..194464e 100644 --- a/tnslc/tnslc.tnsl +++ b/tnslc/tnslc.tnsl @@ -16,7 +16,7 @@ :include "util.tnsl" -/; module tnslc +/; export module tnslc :include "parse/parse.tnsl" :include "ast/ast.tnsl" ;/ @@ -34,11 +34,15 @@ ;tnsl.io.File src = tnsl.io.readFile(args{0}) - ;~{}tnslc.parse.Token psrc = tnslc.parse.tokenize(src) - - ;tnslc.print_tokens(psrc) + ;~{}tnslc.Token psrc = tnslc.parse.tokenize(src) ;src.close() + ;tnslc.print_tokens(psrc) + + ;tnslc.Node tree_node = tnslc.ast.make_tree(psrc, args{0}) + + + ;return 0 ;/ -- cgit v1.2.3