ir-gen: add HasAttrNode conversion

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8e5bf04734112dc6e0885a42b4d546016a6a6964
This commit is contained in:
raf 2026-02-21 20:46:41 +03:00
commit a69385c5ca
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -137,6 +137,11 @@ struct IRGenerator::Impl {
}
return std::make_shared<Node>(select);
}
if (auto* n = node.get_if<HasAttrNode>()) {
auto expr = convert(n->expr);
auto attr = convert(n->attr);
return std::make_shared<Node>(HasAttrNode(expr, attr, n->line));
}
if (auto* n = node.get_if<WithNode>()) {
auto attrs = convert(n->attrs);
auto body = convert(n->body);