From 1fbf63381782b0badead61d1576ad6a1e29fc3ea Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 13 Feb 2014 10:08:04 -0800 Subject: Reimplement exec parsing. Instead of special-casing exec as a command, promote it to a decoration (like 'command' or 'builtin'). This makes tab completion and syntax highlighting treat exec's first argument as a command and is otherwise a nice simplification. Fixes #1300 --- parse_productions.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'parse_productions.cpp') diff --git a/parse_productions.cpp b/parse_productions.cpp index ff473268..d559a0d9 100644 --- a/parse_productions.cpp +++ b/parse_productions.cpp @@ -357,6 +357,7 @@ PRODUCTIONS(decorated_statement) = {symbol_plain_statement}, {KEYWORD(parse_keyword_command), symbol_plain_statement}, {KEYWORD(parse_keyword_builtin), symbol_plain_statement}, + {KEYWORD(parse_keyword_exec), symbol_plain_statement} }; RESOLVE(decorated_statement) { @@ -374,6 +375,8 @@ RESOLVE(decorated_statement) return 1; case parse_keyword_builtin: return 2; + case parse_keyword_exec: + return 3; } } -- cgit v1.2.3