1 const std = @import("std");
2 const TokenType = @import("token_type.zig").TokenType;
10 pub const Literal = union(enum) {
17 pub fn init(@"type": TokenType, lexeme: []const u8, literal: ?Literal, line: u32) Token {
26 pub fn format(self: Token, writer: *std.io.Writer) !void {
27 try writer.print("{} {s} {any}", .{ self.type, self.lexeme, self.literal });