DoxigAlpha

lexeme

Function parameters

Parameters

#

Type definitions in this namespace

Types

#

Source

Implementation

#
pub fn lexeme(tag: Tag) ?[]const u8 {
    return switch (tag) {
        .invalid,
        .identifier,
        .string_literal,
        .multiline_string_literal_line,
        .char_literal,
        .eof,
        .builtin,
        .number_literal,
        .doc_comment,
        .container_doc_comment,
        => null,

        .invalid_periodasterisks => ".**",
        .bang => "!",
        .pipe => "|",
        .pipe_pipe => "||",
        .pipe_equal => "|=",
        .equal => "=",
        .equal_equal => "==",
        .equal_angle_bracket_right => "=>",
        .bang_equal => "!=",
        .l_paren => "(",
        .r_paren => ")",
        .semicolon => ";",
        .percent => "%",
        .percent_equal => "%=",
        .l_brace => "{",
        .r_brace => "}",
        .l_bracket => "[",
        .r_bracket => "]",
        .period => ".",
        .period_asterisk => ".*",
        .ellipsis2 => "..",
        .ellipsis3 => "...",
        .caret => "^",
        .caret_equal => "^=",
        .plus => "+",
        .plus_plus => "++",
        .plus_equal => "+=",
        .plus_percent => "+%",
        .plus_percent_equal => "+%=",
        .plus_pipe => "+|",
        .plus_pipe_equal => "+|=",
        .minus => "-",
        .minus_equal => "-=",
        .minus_percent => "-%",
        .minus_percent_equal => "-%=",
        .minus_pipe => "-|",
        .minus_pipe_equal => "-|=",
        .asterisk => "*",
        .asterisk_equal => "*=",
        .asterisk_asterisk => "**",
        .asterisk_percent => "*%",
        .asterisk_percent_equal => "*%=",
        .asterisk_pipe => "*|",
        .asterisk_pipe_equal => "*|=",
        .arrow => "->",
        .colon => ":",
        .slash => "/",
        .slash_equal => "/=",
        .comma => ",",
        .ampersand => "&",
        .ampersand_equal => "&=",
        .question_mark => "?",
        .angle_bracket_left => "<",
        .angle_bracket_left_equal => "<=",
        .angle_bracket_angle_bracket_left => "<<",
        .angle_bracket_angle_bracket_left_equal => "<<=",
        .angle_bracket_angle_bracket_left_pipe => "<<|",
        .angle_bracket_angle_bracket_left_pipe_equal => "<<|=",
        .angle_bracket_right => ">",
        .angle_bracket_right_equal => ">=",
        .angle_bracket_angle_bracket_right => ">>",
        .angle_bracket_angle_bracket_right_equal => ">>=",
        .tilde => "~",
        .keyword_addrspace => "addrspace",
        .keyword_align => "align",
        .keyword_allowzero => "allowzero",
        .keyword_and => "and",
        .keyword_anyframe => "anyframe",
        .keyword_anytype => "anytype",
        .keyword_asm => "asm",
        .keyword_break => "break",
        .keyword_callconv => "callconv",
        .keyword_catch => "catch",
        .keyword_comptime => "comptime",
        .keyword_const => "const",
        .keyword_continue => "continue",
        .keyword_defer => "defer",
        .keyword_else => "else",
        .keyword_enum => "enum",
        .keyword_errdefer => "errdefer",
        .keyword_error => "error",
        .keyword_export => "export",
        .keyword_extern => "extern",
        .keyword_fn => "fn",
        .keyword_for => "for",
        .keyword_if => "if",
        .keyword_inline => "inline",
        .keyword_noalias => "noalias",
        .keyword_noinline => "noinline",
        .keyword_nosuspend => "nosuspend",
        .keyword_opaque => "opaque",
        .keyword_or => "or",
        .keyword_orelse => "orelse",
        .keyword_packed => "packed",
        .keyword_pub => "pub",
        .keyword_resume => "resume",
        .keyword_return => "return",
        .keyword_linksection => "linksection",
        .keyword_struct => "struct",
        .keyword_suspend => "suspend",
        .keyword_switch => "switch",
        .keyword_test => "test",
        .keyword_threadlocal => "threadlocal",
        .keyword_try => "try",
        .keyword_union => "union",
        .keyword_unreachable => "unreachable",
        .keyword_var => "var",
        .keyword_volatile => "volatile",
        .keyword_while => "while",
    };
}