Implement ast dumping and start treewalker

This commit is contained in:
0x4261756D
2023-10-08 21:40:44 +02:00
parent b00a99ab6a
commit cdfa8d3f90
6 changed files with 641 additions and 345 deletions

View File

@ -1,6 +1,7 @@
const std = @import("std");
const tokenize = @import("tokenizer.zig").tokenize;
const parse = @import("parser.zig").parse;
const treewalk = @import("treewalker.zig").interpret;
pub fn main() !void
{
@ -35,5 +36,5 @@ pub fn main() !void
var parserAllocator = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer parserAllocator.deinit();
const root = try parse(tokens, &parserAllocator);
root.dump(0);
try treewalk(root, allocator);
}