diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-01-22 03:03:37 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-01-22 03:03:37 +0100 |
commit | a724ddbe1c8c53acd8b2836e437237cf17c57043 (patch) | |
tree | 212de4293dbb01400d0251f1478484e8eee60f70 /include | |
parent | 88244bd3070399ba62d79bae6dfdf8b09ff8406d (diff) |
Use macro return_if_error instead of if-statement everywhere
Diffstat (limited to 'include')
-rw-r--r-- | include/parser.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/parser.h b/include/parser.h index d130597..b915dfd 100644 --- a/include/parser.h +++ b/include/parser.h @@ -3,7 +3,11 @@ #include "tokenizer.h" -/* Returns 0 on success */ -int tsl_parse(const char *code, size_t code_size); +typedef enum { + TSL_PARSE_RESULT_ERR, + TSL_PARSE_RESULT_OK +} TslParseResult; + +TslParseResult tsl_parse(const char *code, size_t code_size); #endif /* TSL_PARSER_H */ |