Anonymous mark anonymous struct literal fields as 'field'

This commit is contained in:
Alexandros Naskos 2020-06-26 01:50:36 +03:00
parent 9e3185811e
commit 385e01f613

View File

@ -601,6 +601,8 @@ fn writeNodeTokens(builder: *Builder, arena: *std.heap.ArenaAllocator, store: *D
try gap_highlighter.next(field_init_node); try gap_highlighter.next(field_init_node);
std.debug.assert(field_init_node.id == .FieldInitializer); std.debug.assert(field_init_node.id == .FieldInitializer);
const field_init = field_init_node.cast(ast.Node.FieldInitializer).?; const field_init = field_init_node.cast(ast.Node.FieldInitializer).?;
try writeToken(builder, field_init.period_token, .field);
try writeToken(builder, field_init.name_token, .field);
try writeToken(builder, field_init.name_token + 1, .operator); try writeToken(builder, field_init.name_token + 1, .operator);
try await @asyncCall(child_frame, {}, writeNodeTokens, builder, arena, store, field_init.expr); try await @asyncCall(child_frame, {}, writeNodeTokens, builder, arena, store, field_init.expr);
} }