diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-29 15:40:14 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-11-29 15:40:14 +0000 |
commit | 4cee61fc9e196de6b19249b7fecc8905541a0495 (patch) | |
tree | d562169cd9f34255d6bce20ecf672f5e69ece5f5 /asm/parser.c | |
parent | 9b8936ea0209f2ef371d48675334a427706e218f (diff) | |
download | ovm-4cee61fc9e196de6b19249b7fecc8905541a0495.tar.gz ovm-4cee61fc9e196de6b19249b7fecc8905541a0495.tar.bz2 ovm-4cee61fc9e196de6b19249b7fecc8905541a0495.zip |
Added parse errors for %USE calls
So %USE <STRING> is the expected call pattern, so there's an error if
there isn't a string after %USE.
The other two errors are file I/O errors i.e. nonexistent files or
errors in parsing the other file. We don't report specifics about the
other file, that should be up to the user to check themselves.
Diffstat (limited to 'asm/parser.c')
-rw-r--r-- | asm/parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/asm/parser.c b/asm/parser.c index 421c721..fbffd84 100644 --- a/asm/parser.c +++ b/asm/parser.c @@ -39,6 +39,12 @@ const char *perr_as_cstr(perr_t perr) return "EXPECTED_LABEL"; case PERR_EXPECTED_OPERAND: return "EXPECTED_OPERAND"; + case PERR_PREPROCESSOR_EXPECTED_STRING: + return "PREPROCESSOR_EXPECTED_STRING"; + case PERR_PREPROCESSOR_FILE_NONEXISTENT: + return "PREPROCESSOR_FILE_NONEXISTENT"; + case PERR_PREPROCESSOR_FILE_PARSE_ERROR: + return "PREPROCESSOR_FILE_PARSE_ERROR"; case PERR_PREPROCESSOR_EXPECTED_END: return "PREPROCESSOR_EXPECTED_END"; case PERR_PREPROCESSOR_EXPECTED_NAME: |