feat(xatu): construct lexical scope graphs

This commit is contained in:
2026-09-24 22:53:07 -04:00
parent 7b96309045
commit 334400991b
10 changed files with 984 additions and 22 deletions

View File

@@ -1,6 +1,19 @@
{ pkgs }:
let
render = value:
let
normalized = normalize value;
inherit value;
inherit (pkgs) prefix;
in
assert normalized != null;
{ ${normalized} = "${prefix}${normalized}"; };
normalize = value: if value == null then fallback else value;
fallback = "default";
project = { value, normalize ? value }@args: { inherit (args) value; extra = normalize; };
in
{
result = render (project { value = "name"; }).value;
path = ./. + "/foo";
url = "https://example.com";
inherit pkgs;