Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

enable tooling within lambda bodies #66

Closed
wants to merge 1 commit into from
Closed

Conversation

aaronjanse
Copy link
Member

This minimally implements parsing of lambdas, just enough to allow climb_expr to look inside a lambda's body. Although the evaluator in this PR doesn't understand lambda arguments, existing fallback to static analysis still allows goto-definition for arguments.

Because many Nix files are lambdas, this PR will significantly increase the number of files that evaluation tooling will be work on.

For example:

{ hello }:

# basic tooling now works here
rec {
    foo.bar = 13;
    xyz = foo;
    bbb = hello;
    abc = xyz.bar;
}.xyz.bar

@aaronjanse aaronjanse added the enhancement New feature or request label Nov 16, 2021
@aaronjanse aaronjanse requested a review from Ma27 November 16, 2021 20:55
@aaronjanse
Copy link
Member Author

Hmm, actually this seems to not work as well as I hoped. I'll debug

@aaronjanse
Copy link
Member Author

Ah okay, I think this PR is fine. I just need to rewrite some of the error handling in attribute set parsing, since it's failing too eagerly

@aaronjanse
Copy link
Member Author

We should figure out #68 before considering this PR

@aaronjanse
Copy link
Member Author

This PR exposes some evaluator UI issues, so I'm closing it for now. I'll re-open it once we figure out when to show hover values and fix error handling in the parser

@aaronjanse aaronjanse closed this Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant