-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This particular kind of expression is tricky to implement because of a special case of backwards compatibility with a rarely used Nixpkgs function also named `or` (see [parser.y] for more details). Implementing support for this fallback case incurs a very slight performance penalty. [parser.y]: https://github.com/NixOS/nix/blob/f8b30338ac231262bdf19844f044f0572c460048/src/libexpr/parser.y#L376-L378 Also, since the `or` keyword is only ever used in projections and never on its own, we can safely remove the `ExprOr` type and rely entirely on the `fallback` argument for `ExprProj::new()` instead.
- Loading branch information
1 parent
a1e4c50
commit dc27e6d
Showing
2 changed files
with
32 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters