diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-15 02:05:46 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-15 02:05:46 -0800 |
commit | 54689f60874d46391d9da613ff1305a974a3de24 (patch) | |
tree | e4cbc0727267ce18d0101b46acba0f62ac0b0928 /parse_productions.cpp | |
parent | 5953170f142a6cccd0d8f7e5af08c70f18f42689 (diff) | |
parent | 370b47d23f3cfde3e385c2268adb95229f0f7ed7 (diff) |
Merge branch 'master' into pager
Conflicts:
highlight.h
Diffstat (limited to 'parse_productions.cpp')
-rw-r--r-- | parse_productions.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/parse_productions.cpp b/parse_productions.cpp index 4f40ce61..ff473268 100644 --- a/parse_productions.cpp +++ b/parse_productions.cpp @@ -122,7 +122,7 @@ RESOLVE(statement) If we are 'function', then we are a non-block if we are invoked with -h or --help If we are anything else, we require an argument, so do the same thing if the subsequent token is a statement terminator. */ - + if (token1.type == parse_token_type_string) { // If we are a function, then look for help arguments @@ -135,14 +135,14 @@ RESOLVE(statement) { return 4; } - + // Likewise if the next token doesn't look like an argument at all. This corresponds to e.g. a "naked if". bool naked_invocation_invokes_help = (token1.keyword != parse_keyword_begin && token1.keyword != parse_keyword_end); if (naked_invocation_invokes_help && (token2.type == parse_token_type_end || token2.type == parse_token_type_terminate)) { return 4; } - + } switch (token1.type) @@ -173,12 +173,8 @@ RESOLVE(statement) case parse_keyword_end: return NO_PRODUCTION; - // 'in' is only special within a for_header - case parse_keyword_in: - case parse_keyword_none: - case parse_keyword_command: - case parse_keyword_builtin: - case parse_keyword_case: + // All other keywords fall through to decorated statement + default: return 4; } break; @@ -369,7 +365,7 @@ RESOLVE(decorated_statement) { return 0; } - + switch (token1.keyword) { default: |