From a4cafaad2e2eabcf3262ae503d616d767c9d0f4d Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Tue, 25 Mar 2014 00:34:22 -0700 Subject: [PATCH] Turn on the new "ast" parser by default for execution. This change replaces fish's execution model, and obviates much of parser_t. Instead of parsing fish code into a sequence of commands-arguments, this reifies syntactic constructs into a grammar, builds a parse tree, and executes that. This provides a big simplification and (sometimes) performance boost. fish while loops become C++ while loops, etc. There are some known regressions in error reporting, which ought to be fixed in the soon-to-be-merged parser_cleanup branch. There's also legitimate changes in edge cases. For example, `command builtin ...` now executes a command called "builtin" instead of doing something else weird. The most significant change is that syntactic elements must be unexpected: for example, single quoting 'command' will now cause it to not be recognized. This should be fixed soon. Please open issues for any regressions you find! --- parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.cpp b/parser.cpp index d512f77ef..077d78747 100644 --- a/parser.cpp +++ b/parser.cpp @@ -3145,7 +3145,7 @@ bool parser_use_ast(void) env_var_t var = env_get_string(L"fish_new_parser"); if (var.missing_or_empty()) { - return 0; + return 1; } else {