import "@std" import "@std/debug" import "@std/mem" import "@std/arraylist" test import "@std/arraylist" test import "@std/hashmap" program :: `# these are immutable `x :: 32 `y :: 3.2 ` `# these are mutable `z u32 = 54 main func() void { debug.print("PROGRAM::[[\n{}\n]]\n\n", {program}) tokens std.ArrayList(Token) = arraylist.init(mem.c_allocator) defer arraylist.deinit(&tokens) scan(&tokens, program) catch |_| { debug.print("failed to scan: out of memory\n", {}) return } debug.print("TOKENS::[[\n", {}) for tokens.items |token| { debug.print("{}\n", { token.kind }) } debug.print("]]\n", {}) }