<aside> 💡
Color codes:


➤ 3 main differences:
expand_all_tokens is replaced by defer_expand_tokens for conditional expansionexpand_wildcards is added before parsingparse_and_or first instead of parse_pipelinetokenizer_utils_bonus.cThe bonus adds 4 operators:
| Token | Characters | Purpose |
|---|---|---|
TOKEN_AND |
&& |
Logical AND |
TOKEN_OR |
` | |
TOKEN_LPAREN |
( |
Open subshell |
TOKEN_RPAREN |
) |
Close subshell |
is_operator(char c)&, (, ) to the recognized operator characters.get_operator_token_type(char *str, int *len)&&, ||, >>, <<) and then, single operators*len to 2 or 1 accordinglyexpander_bonus.cIn mandatory all variables are expanded before parsing, but in bonus variables after && and || are deferred to execution.