We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
(123).attr or "OK"
We can evaluate this expression:
nix-repl> (123).attr or "OK" "OK"
Alejandra removes the 'redundant' parenthesis around 123:
123
-(123).attr or "OK" +123.attr or "OK"
And then it fails to parse:
$ alejandra number-parens-attr.nix Failed! 1 error found at: - number-parens-attr.nix: error node at 0..4
This is because (123).attr parses as "the attr attribute of 123" and 123.attr parses as "the value of the attr variable applied to the function 123.":
(123).attr
attr
123.attr
123.
$ nix-instantiate --parse --expr 'let attr = 1; in 123.attr' (let attr = 1; in (123 attr)) $ nix-instantiate --parse --expr 'let attr = 1; in (123).attr' (let attr = 1; in (123).attr)
Version information:
$ alejandra --version Alejandra 3.0.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We can evaluate this expression:
Alejandra removes the 'redundant' parenthesis around
123
:And then it fails to parse:
This is because
(123).attr
parses as "theattr
attribute of123
" and123.attr
parses as "the value of theattr
variable applied to the function123.
":Version information:
The text was updated successfully, but these errors were encountered: