Replaces lambda pattern desugaring with direct `LambdaPatternNode`
generation, which:
- Separates required and optional fields in pattern structure
- Preserves @-binding and ellipsis information in IR
- Remove like 50 lines of Let-binding desugaring logic
and replace string interpolation concatenation tree with
`StringInterpolationNode` to:
- Use `StringPart::make_literal/make_expr` for cleaner representation
- Optimize single-literal strings to `ConstStringNode`
- Remove `toString` builtin wrapper generation
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I7d3fa038f743d02b9caae0979b79f5086a6a6964
Updates IR_VERSION to 3. In an effort to support more features of the
Nix language, implements 5 new node type constants:
- `LAMBDA_PATTERN` = `0x70` - Lambda with pattern matching
- `INHERIT` = `0x71` - Simple inherit expressions
- `INHERIT_FROM` = `0x72` - Inherit from source expression
- `STRING_INTERPOLATION` = `0x73` - String with interpolated parts
- `BUILTIN_CALL` = `0x74` - Builtin function call
and some struct definitions before the Node class, such as `PatternField`.
Those will come in handy for suppporting the entire Nixpkgs library.
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I1f0e81a120a0c956b8068d81c42796616a6a6964
Bunch of things:
- Decode depth and offset from encoded variable indices
- Pre-allocate Values for recursive let bindings before eval
- Use mk* methods for value copying instead of direct assignment
- Evaluate attrset values immediately to avoid dangling thunks
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4dd40c93d74df5973a642fb9f123e70e6a6a6964
Indented strings, ancient let bindings and a bit more
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib86c2d8ca4402dfa0c5c536a9959f4006a6a6964