Compare commits
No commits in common. "727a25963896416ddb49adff324e46316e3386bc" and "756f85d77de1490c7df09d36463801a3b5349172" have entirely different histories.
727a259638
...
756f85d77d
1 changed files with 0 additions and 28 deletions
28
src/expr.zig
28
src/expr.zig
|
@ -1,28 +0,0 @@
|
|||
const Token = @import("token.zig").Token;
|
||||
|
||||
pub const Binary = struct {
|
||||
left: Expr,
|
||||
operator: Token,
|
||||
right: Expr,
|
||||
};
|
||||
|
||||
pub const Grouping = struct {
|
||||
expression: Expr,
|
||||
};
|
||||
|
||||
pub const Unary = struct {
|
||||
operator: Token,
|
||||
right: Expr,
|
||||
};
|
||||
|
||||
pub const ExprType = enum {
|
||||
Binary,
|
||||
Grouping,
|
||||
Unary,
|
||||
};
|
||||
|
||||
pub const Expr = union(ExprType) {
|
||||
Binary: Binary,
|
||||
Grouping: Grouping,
|
||||
Unary: Unary,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue