pointers
This commit is contained in:
@@ -27,6 +27,7 @@ pub const Tag = enum {
|
||||
kw_and,
|
||||
kw_or,
|
||||
kw_Type, // Type (metatype keyword)
|
||||
kw_null, // null
|
||||
|
||||
// Symbols
|
||||
colon, // :
|
||||
@@ -57,6 +58,7 @@ pub const Tag = enum {
|
||||
slash_equal, // /=
|
||||
percent, // %
|
||||
percent_equal, // %=
|
||||
ampersand, // &
|
||||
|
||||
// Delimiters
|
||||
l_paren, // (
|
||||
@@ -109,6 +111,8 @@ pub const Tag = enum {
|
||||
.slash_equal => "/=",
|
||||
.percent => "%",
|
||||
.percent_equal => "%=",
|
||||
.ampersand => "&",
|
||||
.kw_null => "null",
|
||||
.l_paren => "(",
|
||||
.r_paren => ")",
|
||||
.l_brace => "{",
|
||||
@@ -166,6 +170,7 @@ pub const keywords = std.StaticStringMap(Tag).initComptime(.{
|
||||
.{ "and", .kw_and },
|
||||
.{ "or", .kw_or },
|
||||
.{ "Type", .kw_Type },
|
||||
.{ "null", .kw_null },
|
||||
});
|
||||
|
||||
pub fn getKeyword(bytes: []const u8) ?Tag {
|
||||
|
||||
Reference in New Issue
Block a user