Use pointers

This commit is contained in:
2026-07-14 12:04:59 +02:00
parent 95d5ae2c9e
commit 8a2865828f
3 changed files with 18 additions and 37 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ read_stdin :: proc() -> []string {
return strings.split_lines(content)
}
print_token :: proc(token: Token, depth: int = 0) {
print_token :: proc(token: ^Token, depth: int = 0) {
indent := strings.repeat(" ", depth, context.temp_allocator)
type_str := ""
@@ -56,5 +56,5 @@ print_token :: proc(token: Token, depth: int = 0) {
main :: proc() {
lines := read_stdin()
parsed := parse(lines)
print_token(parsed)
print_token(&parsed)
}