Merge pull request #1184 from Techatrix/fix-semantic-tokens-on-continue
fix semantic token generation crash on continue expression
This commit is contained in:
commit
d0a9911a3a
@ -701,14 +701,17 @@ fn writeNodeTokens(builder: *Builder, node: Ast.Node.Index) error{OutOfMemory}!v
|
|||||||
.grouped_expression => {
|
.grouped_expression => {
|
||||||
try callWriteNodeTokens(allocator, .{ builder, node_data[node].lhs });
|
try callWriteNodeTokens(allocator, .{ builder, node_data[node].lhs });
|
||||||
},
|
},
|
||||||
.@"break",
|
.@"break" => {
|
||||||
.@"continue",
|
|
||||||
=> {
|
|
||||||
try writeToken(builder, main_token, .keyword);
|
try writeToken(builder, main_token, .keyword);
|
||||||
if (node_data[node].lhs != 0)
|
if (node_data[node].lhs != 0)
|
||||||
try writeToken(builder, node_data[node].lhs, .label);
|
try writeToken(builder, node_data[node].lhs, .label);
|
||||||
try callWriteNodeTokens(allocator, .{ builder, node_data[node].rhs });
|
try callWriteNodeTokens(allocator, .{ builder, node_data[node].rhs });
|
||||||
},
|
},
|
||||||
|
.@"continue" => {
|
||||||
|
try writeToken(builder, main_token, .keyword);
|
||||||
|
if (node_data[node].lhs != 0)
|
||||||
|
try writeToken(builder, node_data[node].lhs, .label);
|
||||||
|
},
|
||||||
.@"suspend", .@"return" => {
|
.@"suspend", .@"return" => {
|
||||||
try writeToken(builder, main_token, .keyword);
|
try writeToken(builder, main_token, .keyword);
|
||||||
try callWriteNodeTokens(allocator, .{ builder, node_data[node].lhs });
|
try callWriteNodeTokens(allocator, .{ builder, node_data[node].lhs });
|
||||||
|
Loading…
Reference in New Issue
Block a user