commit e47be49c048332b508f0ea13eab361133fd31b4b Author: RGBCube Date: Mon Feb 26 23:59:53 2024 +0300 Initial version diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..14af6c7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,40 @@ +{ + outputs = { self }: { + escape = s: s; # TODO + + __findFile = _: name: if builtins.substring 0 1 name == "." then { + _type = "end"; + _name = builtins.substring 1 (builtins.stringLength name) name; + } else if builtins.substring (builtins.stringLength name - 1) 1 name == "." then { + _type = "lone"; + _name = builtins.substring 0 (builtins.stringLength name - 1) name; + } else { + _type = "start"; + _name = name; + + _accum = []; + __functor = let + impl = this: next: if + next._type or null == "end" && + next._name == this._name + then + this._accum + else this // { + _accum = this._accum ++ [ next ]; + __functor = impl; + }; + in impl; + }; + + result = let inherit (self) __findFile; in + + + {charset="UTF-8";} + "Hello, internet!"<.title> + <.head> + <body> + <p>"What the fuck is this?"<.p> + <.body> + <.html>; + }; +}