brewery
notashelf /
a69385c5cabdc171c73722d7935503725445ac81

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git

Commit a69385c5cabd

tarball

NotAShelf <raf@notashelf.dev> · 2026-02-21 21:07 UTC

unverified1 files changed+5-0
ir-gen: add `HasAttrNode` conversion

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8e5bf04734112dc6e0885a42b4d546016a6a6964
diff --git a/src/irc/ir_gen.cpp b/src/irc/ir_gen.cppindex d149c1a..5b56cec 100644--- a/src/irc/ir_gen.cpp+++ b/src/irc/ir_gen.cpp@@ -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);