Payload semantic highlighting
This commit is contained in:
parent
e2a3b38f5a
commit
65ad078b8c
@ -383,18 +383,22 @@ fn writeNodeTokens(builder: *Builder, arena: *std.heap.ArenaAllocator, store: *D
|
|||||||
.Payload => {
|
.Payload => {
|
||||||
const payload = node.cast(ast.Node.Payload).?;
|
const payload = node.cast(ast.Node.Payload).?;
|
||||||
try writeToken(builder, payload.lpipe, .operator);
|
try writeToken(builder, payload.lpipe, .operator);
|
||||||
|
try writeToken(builder, payload.error_symbol.firstToken(), .variable);
|
||||||
try writeToken(builder, payload.rpipe, .operator);
|
try writeToken(builder, payload.rpipe, .operator);
|
||||||
},
|
},
|
||||||
.PointerPayload => {
|
.PointerPayload => {
|
||||||
const payload = node.cast(ast.Node.PointerPayload).?;
|
const payload = node.cast(ast.Node.PointerPayload).?;
|
||||||
try writeToken(builder, payload.lpipe, .operator);
|
try writeToken(builder, payload.lpipe, .operator);
|
||||||
try writeToken(builder, payload.ptr_token, .operator);
|
try writeToken(builder, payload.ptr_token, .operator);
|
||||||
|
try writeToken(builder, payload.value_symbol.firstToken(), .variable);
|
||||||
try writeToken(builder, payload.rpipe, .operator);
|
try writeToken(builder, payload.rpipe, .operator);
|
||||||
},
|
},
|
||||||
.PointerIndexPayload => {
|
.PointerIndexPayload => {
|
||||||
const payload = node.cast(ast.Node.PointerIndexPayload).?;
|
const payload = node.cast(ast.Node.PointerIndexPayload).?;
|
||||||
try writeToken(builder, payload.lpipe, .operator);
|
try writeToken(builder, payload.lpipe, .operator);
|
||||||
try writeToken(builder, payload.ptr_token, .operator);
|
try writeToken(builder, payload.ptr_token, .operator);
|
||||||
|
try writeToken(builder, payload.value_symbol.firstToken(), .variable);
|
||||||
|
if (payload.index_symbol) |index_symbol| try writeToken(builder, index_symbol.firstToken(), .variable);
|
||||||
try writeToken(builder, payload.rpipe, .operator);
|
try writeToken(builder, payload.rpipe, .operator);
|
||||||
},
|
},
|
||||||
.Else => {
|
.Else => {
|
||||||
@ -538,7 +542,6 @@ fn writeNodeTokens(builder: *Builder, arena: *std.heap.ArenaAllocator, store: *D
|
|||||||
.SliceType, .PtrType => |info| {
|
.SliceType, .PtrType => |info| {
|
||||||
if (prefix_op.op == .PtrType) try writeToken(builder, prefix_op.op_token, tok_type);
|
if (prefix_op.op == .PtrType) try writeToken(builder, prefix_op.op_token, tok_type);
|
||||||
|
|
||||||
// @TODO Fix align info
|
|
||||||
if (info.align_info) |align_info| {
|
if (info.align_info) |align_info| {
|
||||||
if (prefix_op.op == .PtrType) {
|
if (prefix_op.op == .PtrType) {
|
||||||
try writeToken(builder, prefix_op.op_token + 1, .keyword);
|
try writeToken(builder, prefix_op.op_token + 1, .keyword);
|
||||||
|
Loading…
Reference in New Issue
Block a user