Use pointers
This commit is contained in:
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user