Fixed error union decls
This commit is contained in:
parent
693e810d75
commit
be9f2de43a
@ -165,6 +165,10 @@ pub fn getDeclNameToken(tree: *ast.Tree, node: *ast.Node) ?ast.TokenIndex {
|
|||||||
const field = node.cast(ast.Node.ContainerField).?;
|
const field = node.cast(ast.Node.ContainerField).?;
|
||||||
return field.name_token;
|
return field.name_token;
|
||||||
},
|
},
|
||||||
|
.ErrorTag => {
|
||||||
|
const tag = node.cast(ast.Node.ErrorTag).?;
|
||||||
|
return tag.name_token;
|
||||||
|
},
|
||||||
// We need identifier for captures and error set tags
|
// We need identifier for captures and error set tags
|
||||||
.Identifier => {
|
.Identifier => {
|
||||||
const ident = node.cast(ast.Node.Identifier).?;
|
const ident = node.cast(ast.Node.Identifier).?;
|
||||||
@ -1291,7 +1295,7 @@ fn makeScopeInternal(
|
|||||||
.tests = &[0]*ast.Node{},
|
.tests = &[0]*ast.Node{},
|
||||||
.data = .{ .container = node },
|
.data = .{ .container = node },
|
||||||
};
|
};
|
||||||
var scope_idx = scopes.items.len - 1;
|
const scope_idx = scopes.items.len - 1;
|
||||||
var uses = std.ArrayList(*ast.Node.Use).init(allocator);
|
var uses = std.ArrayList(*ast.Node.Use).init(allocator);
|
||||||
var tests = std.ArrayList(*ast.Node).init(allocator);
|
var tests = std.ArrayList(*ast.Node).init(allocator);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user