pub fn symbol(tag: Tag) []const u8
tag: Tag
308 309 310 311 312 313 314 315 316 317 318 319 320 321
pub fn symbol(tag: Tag) []const u8 { return tag.lexeme() orelse switch (tag) { .invalid => "invalid token", .identifier => "an identifier", .string_literal => "a string literal", .multiline_string_literal_line => "a multiline string literal", .char_literal => "a character literal", .eof => "EOF", .builtin => "a builtin function", .number_literal => "a number literal", .doc_comment, .container_doc_comment => "a document comment", else => unreachable, }; }