aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_productions.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-13 10:08:04 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-13 10:10:49 -0800
commit1fbf63381782b0badead61d1576ad6a1e29fc3ea (patch)
tree778b1397a565f6cc214ae62ed6c15921d77d63b7 /parse_productions.cpp
parentf733dc5eae81c092f74522f4e5cc7b3d27f2b943 (diff)
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
Diffstat (limited to 'parse_productions.cpp')
-rw-r--r--parse_productions.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}
}