sync with zig master version llvm15 (#652)
This commit is contained in:
parent
bd6f60e451
commit
5aff17afb0
@ -1617,7 +1617,7 @@ pub fn documentPositionContext(arena: *std.heap.ArenaAllocator, document: types.
|
|||||||
fn addOutlineNodes(allocator: std.mem.Allocator, tree: Ast, child: Ast.Node.Index, context: *GetDocumentSymbolsContext) anyerror!void {
|
fn addOutlineNodes(allocator: std.mem.Allocator, tree: Ast, child: Ast.Node.Index, context: *GetDocumentSymbolsContext) anyerror!void {
|
||||||
switch (tree.nodes.items(.tag)[child]) {
|
switch (tree.nodes.items(.tag)[child]) {
|
||||||
.string_literal,
|
.string_literal,
|
||||||
.integer_literal,
|
.number_literal,
|
||||||
.builtin_call,
|
.builtin_call,
|
||||||
.builtin_call_comma,
|
.builtin_call_comma,
|
||||||
.builtin_call_two,
|
.builtin_call_two,
|
||||||
@ -3037,8 +3037,7 @@ fn makeScopeInternal(allocator: std.mem.Allocator, context: ScopeContext, node_i
|
|||||||
.anyframe_type,
|
.anyframe_type,
|
||||||
.anyframe_literal,
|
.anyframe_literal,
|
||||||
.char_literal,
|
.char_literal,
|
||||||
.integer_literal,
|
.number_literal,
|
||||||
.float_literal,
|
|
||||||
.unreachable_literal,
|
.unreachable_literal,
|
||||||
.@"continue",
|
.@"continue",
|
||||||
=> {},
|
=> {},
|
||||||
|
@ -462,8 +462,7 @@ pub fn lastToken(tree: Ast, node: Ast.Node.Index) Ast.TokenIndex {
|
|||||||
|
|
||||||
.anyframe_literal,
|
.anyframe_literal,
|
||||||
.char_literal,
|
.char_literal,
|
||||||
.integer_literal,
|
.number_literal,
|
||||||
.float_literal,
|
|
||||||
.unreachable_literal,
|
.unreachable_literal,
|
||||||
.identifier,
|
.identifier,
|
||||||
.deref,
|
.deref,
|
||||||
|
@ -326,8 +326,7 @@ fn writeNodeInlayHint(builder: *Builder, arena: *std.heap.ArenaAllocator, store:
|
|||||||
.anyframe_type,
|
.anyframe_type,
|
||||||
.anyframe_literal,
|
.anyframe_literal,
|
||||||
.char_literal,
|
.char_literal,
|
||||||
.integer_literal,
|
.number_literal,
|
||||||
.float_literal,
|
|
||||||
.unreachable_literal,
|
.unreachable_literal,
|
||||||
.identifier,
|
.identifier,
|
||||||
.enum_literal,
|
.enum_literal,
|
||||||
|
@ -109,7 +109,7 @@ const Builder = struct {
|
|||||||
const tok_id = tree.tokens.items(.tag)[tok];
|
const tok_id = tree.tokens.items(.tag)[tok];
|
||||||
const tok_type: TokenType = switch (tok_id) {
|
const tok_type: TokenType = switch (tok_id) {
|
||||||
.keyword_unreachable => .keywordLiteral,
|
.keyword_unreachable => .keywordLiteral,
|
||||||
.integer_literal, .float_literal => .number,
|
.number_literal => .number,
|
||||||
.string_literal, .multiline_string_literal_line, .char_literal => .string,
|
.string_literal, .multiline_string_literal_line, .char_literal => .string,
|
||||||
.period, .comma, .r_paren, .l_paren, .r_brace, .l_brace, .semicolon, .colon => return,
|
.period, .comma, .r_paren, .l_paren, .r_brace, .l_brace, .semicolon, .colon => return,
|
||||||
|
|
||||||
@ -720,8 +720,7 @@ fn writeNodeTokens(builder: *Builder, arena: *std.heap.ArenaAllocator, store: *D
|
|||||||
try writeToken(builder, main_token, .keyword);
|
try writeToken(builder, main_token, .keyword);
|
||||||
try await @asyncCall(child_frame, {}, writeNodeTokens, .{ builder, arena, store, node_data[node].lhs });
|
try await @asyncCall(child_frame, {}, writeNodeTokens, .{ builder, arena, store, node_data[node].lhs });
|
||||||
},
|
},
|
||||||
.integer_literal,
|
.number_literal,
|
||||||
.float_literal,
|
|
||||||
=> {
|
=> {
|
||||||
try writeToken(builder, main_token, .number);
|
try writeToken(builder, main_token, .number);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user