Remove more redundant code, rename function

This commit is contained in:
SuperAuguste
2020-05-14 12:23:26 -04:00
parent 58015dcd64
commit 86a1edf9c7
2 changed files with 2 additions and 10 deletions

View File

@@ -341,7 +341,7 @@ pub fn getFieldAccessTypeNode(analysis_ctx: *AnalysisContext, tokenizer: *std.zi
return current_node;
}
pub fn isPublic(tree: *ast.Tree, node: *ast.Node) bool {
pub fn isNodePublic(tree: *ast.Tree, node: *ast.Node) bool {
switch (node.id) {
.VarDecl => {
const var_decl = node.cast(ast.Node.VarDecl).?;
@@ -389,11 +389,3 @@ pub fn nodeToString(tree: *ast.Tree, node: *ast.Node) ?[]const u8 {
return null;
}
pub fn nodesToString(tree: *ast.Tree, maybe_nodes: ?[]*ast.Node) void {
if (maybe_nodes) |nodes| {
for (nodes) |node| {
std.debug.warn("- {}\n", .{nodeToString(tree, node)});
}
} else std.debug.warn("No nodes\n", .{});
}