ast: add printing of Variable Expr
This commit is contained in:
parent
d93adbbd3e
commit
7c4aa04b00
2 changed files with 4 additions and 2 deletions
|
@ -9,5 +9,5 @@ fn main(a int) int {
|
|||
1 + 2 + 3 + 4
|
||||
1 + 1 * 1
|
||||
3 / (51 + 2)
|
||||
println(2 * 1956)
|
||||
println(2 * 1956 + a)
|
||||
}
|
||||
|
|
|
@ -199,7 +199,9 @@ pub fn printExpr(expr: *Expr) void {
|
|||
}
|
||||
},
|
||||
|
||||
else => std.debug.warn("EXPR_UNKNOWN"),
|
||||
.Variable => |token| std.debug.warn("{}", token.lexeme),
|
||||
|
||||
else => std.debug.warn("UnknownExpr-{}", @tagName(expr.*)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue