8000 `__curPos` is not highlighted · Issue #132 · oxalica/nil · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

__curPos is not highlighted #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aciceri opened this issue Apr 23, 2024 · 2 comments
Open

__curPos is not highlighted #132

aciceri opened this issue Apr 23, 2024 · 2 comments
Labels
A-nameres Area: name resolution C-feature Catagory: feature good first issue Good for newcomers

Comments

@aciceri
Copy link
aciceri commented Apr 23, 2024

Notice that it's not a builtin but a keyword, I don't know where it should be added in the nil codebase. Also notice that probably there could be other keywords, it would be nice having a test or something that runs nix eval --expr "builtins.attrNames builtins" --json to check if we are considering all the builtins (if something similar isn't already done). I don't know if a similar introspection is possible also for keywords.

@oxalica oxalica added C-feature Catagory: feature good first issue Good for newcomers A-nameres Area: name resolution labels Nov 19, 2024
@lucasew
Copy link
lucasew commented Jan 7, 2025

__curPos in Nixpkgs is used as a implementation detail for something but nil treats its reference as a missing variable.

I want to eventually bring nil to nixpkgs as a ci step but this is a blocker as far as I know

@lf-
Copy link
lf- commented May 2, 2025

I don't think there are any other ones, but here's the code: https://git.lix.systems/lix-project/lix/src/f324574265f5d90fca1d18311c0ebb057116db0e/lix/libexpr/parser/parser-impl1.inc.cc#L403-L410

It's documented here: https://docs.lix.systems/manual/lix/stable/language/constructs.html#keywords-__curPos

It would be mostly correct for nil to treat it as a builtin. The type of its output is known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-nameres Area: name resolution C-feature Catagory: feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants
0