From 30e3572cee7e6b919d43405840502b926d4c1d21 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Sat, 16 Jan 2021 03:46:35 -0300 Subject: [PATCH] Rename tagField to enumMember --- src/semantic_tokens.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/semantic_tokens.zig b/src/semantic_tokens.zig index e8abea3..b028397 100644 --- a/src/semantic_tokens.zig +++ b/src/semantic_tokens.zig @@ -8,7 +8,7 @@ pub const TokenType = enum(u32) { type, parameter, variable, - tagField, + enumMember, field, errorTag, 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; return @as(?TokenType, switch (handle.tree.token_ids[container_decl.kind_token]) { .Keyword_struct => .field, - .Keyword_union, .Keyword_enum => .tagField, + .Keyword_union, .Keyword_enum => .enumMember, else => null, }); } @@ -615,8 +615,8 @@ fn writeNodeTokens(builder: *Builder, arena: *std.heap.ArenaAllocator, store: *D }, .EnumLiteral => { const enum_literal = node.cast(ast.Node.EnumLiteral).?; - try writeToken(builder, enum_literal.dot, .tagField); - try writeToken(builder, enum_literal.name, .tagField); + try writeToken(builder, enum_literal.dot, .enumMember); + try writeToken(builder, enum_literal.name, .enumMember); }, .FloatLiteral => { try writeToken(builder, node.firstToken(), .number);