Files
honey/source/main.hon
T
2026-07-23 09:42:00 +02:00

36 lines
735 B
Plaintext

import "@std"
import "@std/debug"
import "@std/mem"
import "@std/arraylist"
test import "@std/enums"
test import "@std/arraylist"
test import "@std/hashmap"
test import "@std/static_string_map"
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", {})
}