diff options
author | 2014-01-13 02:24:11 -0800 | |
---|---|---|
committer | 2014-01-13 02:24:11 -0800 | |
commit | 95f87cdd56602fe7c2746519f875741c325d2df8 (patch) | |
tree | de2756889e04deac7c62a3eefaa7c86c3f713147 /parse_constants.h | |
parent | 746cc4c10b40cff7d0c88eac2448864506d8098b (diff) |
Support for special && and || error messages in new parser
Diffstat (limited to 'parse_constants.h')
-rw-r--r-- | parse_constants.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/parse_constants.h b/parse_constants.h index 266d27e1..e910507a 100644 --- a/parse_constants.h +++ b/parse_constants.h @@ -119,6 +119,9 @@ enum parse_error_code_t parse_error_unbalancing_end, //end outside of block parse_error_unbalancing_else, //else outside of if parse_error_unbalancing_case, //case outside of switch + + parse_error_double_pipe, // foo || bar, has special error message + parse_error_double_background // foo && bar, has special error message }; enum { @@ -138,18 +141,15 @@ typedef unsigned int parser_test_error_bits_t; /** Error message on reaching maximum call stack depth */ #define CALL_STACK_LIMIT_EXCEEDED_ERR_MSG _( L"The function call stack limit has been exceeded. Do you have an accidental infinite loop?") -/** Error message when a non-string token is found when expecting a command name */ -#define CMD_ERR_MSG _( L"Expected a command name, got token of type '%ls'") - /** Error message when a non-string token is found when expecting a command name */ -#define CMD_OR_ERR_MSG _( L"Expected a command name, got token of type '%ls'. Did you mean 'COMMAND; or COMMAND'? See the help section for the 'or' builtin command by typing 'help or'.") +#define CMD_OR_ERR_MSG _( L"Expected a command, but instead found a pipe. Did you mean 'COMMAND; or COMMAND'? See the help section for the 'or' builtin command by typing 'help or'.") /** Error message when a non-string token is found when expecting a command name */ -#define CMD_AND_ERR_MSG _( L"Expected a command name, got token of type '%ls'. Did you mean 'COMMAND; and COMMAND'? See the help section for the 'and' builtin command by typing 'help and'.") +#define CMD_AND_ERR_MSG _( L"Expected a command, but instead found a '&'. Did you mean 'COMMAND; and COMMAND'? See the help section for the 'and' builtin command by typing 'help and'.") /** Error message when encountering an illegal command name |