Removed logs and unused utility function

This commit is contained in:
Sergeeeek 2020-05-19 07:47:23 +03:00
parent 4b3cb641c0
commit 06ba823368
2 changed files with 0 additions and 10 deletions

View File

@ -310,7 +310,6 @@ pub fn resolveTypeOfNode(analysis_ctx: *AnalysisContext, node: *ast.Node) ?*ast.
const builtin_call = node.cast(ast.Node.BuiltinCall).?; const builtin_call = node.cast(ast.Node.BuiltinCall).?;
if (!std.mem.eql(u8, analysis_ctx.tree.tokenSlice(builtin_call.builtin_token), "@import")) return null; if (!std.mem.eql(u8, analysis_ctx.tree.tokenSlice(builtin_call.builtin_token), "@import")) return null;
if (builtin_call.params.len > 1) return null; if (builtin_call.params.len > 1) return null;
std.debug.warn("Importing {}\n", .{analysis_ctx.tree.getNodeSource(node)});
const import_param = builtin_call.params.at(0).*; const import_param = builtin_call.params.at(0).*;
if (import_param.id != .StringLiteral) return null; if (import_param.id != .StringLiteral) return null;

View File

@ -376,15 +376,6 @@ fn completeGlobal(id: i64, pos_index: usize, handle: *DocumentStore.Handle, conf
}); });
} }
fn nodePosition(tree: *std.zig.ast.Tree, node: *std.zig.ast.Node) types.Position {
const location = tree.tokenLocation(0, node.firstToken());
return types.Position{
.line = @intCast(i64, location.line),
.character = @intCast(i64, location.column),
};
}
fn completeFieldAccess(id: i64, handle: *DocumentStore.Handle, position: types.Position, line_start_idx: usize, config: Config) !void { fn completeFieldAccess(id: i64, handle: *DocumentStore.Handle, position: types.Position, line_start_idx: usize, config: Config) !void {
var arena = std.heap.ArenaAllocator.init(allocator); var arena = std.heap.ArenaAllocator.init(allocator);
defer arena.deinit(); defer arena.deinit();