Refactor how redirections are represented by the tokenizer

Prior to this fix, each redirection type was a separate token_type.
Unify these under a single type TOK_REDIRECT and break the redirection
type out into a new sub-type redirection_type_t.
This commit is contained in:
ridiculousfish
2018-02-23 15:19:58 -08:00
parent 6673fe5457
commit 99fb7bb6aa
8 changed files with 131 additions and 147 deletions

View File

@@ -231,11 +231,7 @@ static inline parse_token_type_t parse_token_type_from_tokenizer_token(
result = parse_token_type_background;
break;
}
case TOK_REDIRECT_OUT:
case TOK_REDIRECT_APPEND:
case TOK_REDIRECT_IN:
case TOK_REDIRECT_FD:
case TOK_REDIRECT_NOCLOB: {
case TOK_REDIRECT: {
result = parse_token_type_redirection;
break;
}