]> Repositories - zlox.git/blobdiff - src/Token.zig
Remove unnecessary error logic
[zlox.git] / src / Token.zig
index 96f83784835e5abe25555d7215d48f76867ad3fb..596b1baefc7d8052d306c75a2dbf7433ca745360 100644 (file)
@@ -7,9 +7,11 @@ lexeme: []const u8,
 literal: ?Literal,
 line: u32,
 
-pub const Literal = union {
+pub const Literal = union(enum) {
     string: []const u8,
     number: f64,
+    boolean: bool,
+    nil: void,
 };
 
 pub fn init(@"type": TokenType, lexeme: []const u8, literal: ?Literal, line: u32) Token {