From 136f2f7046dfed18fde0b5f9933ddfafc1518ef5 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 13 Sep 2013 16:55:33 -0400 Subject: Add the ExprBuiltin Expr type to the AST Certain desugaring schemes may require the parser to use some builtin function to do some of the work (e.g. currently `throw` is used to lazily cause an error if a `<>`-style path is not in the search path) Unfortunately, these names are not reserved keywords, so an expression that uses such a syntactic sugar will not see the expected behavior (see tests/lang/eval-okay-redefine-builtin.nix for an example). This adds the ExprBuiltin AST type, which when evaluated uses the value from the rootmost variable scope (which of course is initialized internally and can't shadow any of the builtins). Signed-off-by: Shea Levy --- tests/lang/eval-okay-redefine-builtin.exp | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/lang/eval-okay-redefine-builtin.exp (limited to 'tests/lang/eval-okay-redefine-builtin.exp') diff --git a/tests/lang/eval-okay-redefine-builtin.exp b/tests/lang/eval-okay-redefine-builtin.exp new file mode 100644 index 000000000000..c508d5366f70 --- /dev/null +++ b/tests/lang/eval-okay-redefine-builtin.exp @@ -0,0 +1 @@ +false -- cgit 1.4.1