Rename tagField to enumMember
This commit is contained in:
parent
4f5af38031
commit
30e3572cee
@ -8,7 +8,7 @@ pub const TokenType = enum(u32) {
|
|||||||
type,
|
type,
|
||||||
parameter,
|
parameter,
|
||||||
variable,
|
variable,
|
||||||
tagField,
|
enumMember,
|
||||||
field,
|
field,
|
||||||
errorTag,
|
errorTag,
|
||||||
function,
|
function,
|
||||||
@ -117,7 +117,7 @@ fn fieldTokenType(container_decl: *ast.Node.ContainerDecl, handle: *DocumentStor
|
|||||||
if (container_decl.kind_token > handle.tree.token_ids.len) return null;
|
if (container_decl.kind_token > handle.tree.token_ids.len) return null;
|
||||||
return @as(?TokenType, switch (handle.tree.token_ids[container_decl.kind_token]) {
|
return @as(?TokenType, switch (handle.tree.token_ids[container_decl.kind_token]) {
|
||||||
.Keyword_struct => .field,
|
.Keyword_struct => .field,
|
||||||
.Keyword_union, .Keyword_enum => .tagField,
|
.Keyword_union, .Keyword_enum => .enumMember,
|
||||||
else => null,
|
else => null,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -615,8 +615,8 @@ fn writeNodeTokens(builder: *Builder, arena: *std.heap.ArenaAllocator, store: *D
|
|||||||
},
|
},
|
||||||
.EnumLiteral => {
|
.EnumLiteral => {
|
||||||
const enum_literal = node.cast(ast.Node.EnumLiteral).?;
|
const enum_literal = node.cast(ast.Node.EnumLiteral).?;
|
||||||
try writeToken(builder, enum_literal.dot, .tagField);
|
try writeToken(builder, enum_literal.dot, .enumMember);
|
||||||
try writeToken(builder, enum_literal.name, .tagField);
|
try writeToken(builder, enum_literal.name, .enumMember);
|
||||||
},
|
},
|
||||||
.FloatLiteral => {
|
.FloatLiteral => {
|
||||||
try writeToken(builder, node.firstToken(), .number);
|
try writeToken(builder, node.firstToken(), .number);
|
||||||
|
Loading…
Reference in New Issue
Block a user