feat(xatu): construct lexical scope graphs
This commit is contained in:
15
src/xatu/testdata/clean.nix
vendored
15
src/xatu/testdata/clean.nix
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user