dot-shorthand and more
This commit is contained in:
12
src/sema.zig
12
src/sema.zig
@@ -850,12 +850,8 @@ pub const Analyzer = struct {
|
||||
.union_decl => |ud| {
|
||||
try self.addSymbol(ud.name, .enum_type, .{ .union_type = ud.name }, node.span);
|
||||
},
|
||||
.enum_literal => |el| {
|
||||
if (el.payload) |p| {
|
||||
try self.analyzeNode(p);
|
||||
}
|
||||
},
|
||||
// Leaf nodes — nothing to recurse into
|
||||
.enum_literal,
|
||||
.int_literal,
|
||||
.float_literal,
|
||||
.bool_literal,
|
||||
@@ -1255,12 +1251,8 @@ pub fn findNodeAtOffset(node: *Node, offset: u32) ?*Node {
|
||||
if (findNodeAtOffset(fi.value, offset)) |found| return found;
|
||||
}
|
||||
},
|
||||
.enum_literal => |el| {
|
||||
if (el.payload) |p| {
|
||||
if (findNodeAtOffset(p, offset)) |found| return found;
|
||||
}
|
||||
},
|
||||
// Leaf nodes
|
||||
.enum_literal,
|
||||
.identifier,
|
||||
.int_literal,
|
||||
.float_literal,
|
||||
|
||||
Reference in New Issue
Block a user