Fix references to now removed, previously deprecated std.ascii declarations

This commit is contained in:
Alexandros Naskos 2022-12-10 23:21:55 +02:00
parent 9e658cdbb6
commit 3cac23f8a1
No known key found for this signature in database
GPG Key ID: 02BF2E72B0EA32D2
4 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ const zls_version = std.builtin.Version{ .major = 0, .minor = 11, .patch = 0 };
pub fn build(b: *std.build.Builder) !void {
const current_zig = builtin.zig_version;
const min_zig = std.SemanticVersion.parse("0.11.0-dev.399+44ee1c885") catch return; // whereabouts allocgate 2.0
const min_zig = std.SemanticVersion.parse("0.11.0-dev.715+cffbb32d3") catch return; // whereabouts allocgate 2.0
if (current_zig.order(min_zig).compare(.lt)) @panic(b.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{ current_zig, min_zig }));
const target = b.standardTargetOptions(.{});

View File

@ -795,7 +795,7 @@ pub fn identifierFromPosition(pos_index: usize, handle: DocumentStore.Handle) []
}
fn isSymbolChar(char: u8) bool {
return std.ascii.isAlNum(char) or char == '_';
return std.ascii.isAlphanumeric(char) or char == '_';
}
fn gotoDefinitionSymbol(

View File

@ -77,7 +77,7 @@ pub fn collectDocComments(allocator: std.mem.Allocator, tree: Ast, doc_comments:
while (true) : (curr_line_tok += 1) {
const comm = tokens[curr_line_tok];
if ((container_doc and comm == .container_doc_comment) or (!container_doc and comm == .doc_comment)) {
try lines.append(std.mem.trim(u8, tree.tokenSlice(curr_line_tok)[3..], &std.ascii.spaces));
try lines.append(std.mem.trim(u8, tree.tokenSlice(curr_line_tok)[3..], &std.ascii.whitespace));
} else break;
}

View File

@ -299,7 +299,7 @@ fn createDiscardText(builder: *Builder, identifier_name: []const u8, declaration
const indent = find_indent: {
const line = offsets.lineSliceUntilIndex(builder.handle.text, declaration_start);
for(line) |char, i| {
if(!std.ascii.isSpace(char)) {
if(!std.ascii.isWhitespace(char)) {
break :find_indent line[0..i];
}
}
@ -600,5 +600,5 @@ fn getCaptureLoc(text: []const u8, loc: offsets.Loc, is_index_payload: bool) ?Ca
}
fn isSymbolChar(char: u8) bool {
return std.ascii.isAlNum(char) or char == '_';
return std.ascii.isAlphanumeric(char) or char == '_';
}