summaryrefslogtreecommitdiff
path: root/py/parse.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-15 21:23:31 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-15 21:23:31 +0000
commit9528cd66d7c94d7376884a53c2080b29e9bc3a0a (patch)
tree7c3ad5d4af03b7760f7c3be4ae1a1e9555113324 /py/parse.h
parent24224d7c72e1d6572ef0d24f08eb882dcac8dc50 (diff)
Convert parse errors to exceptions.
Parser no longer prints an error, but instead returns an exception ID and message.
Diffstat (limited to 'py/parse.h')
-rw-r--r--py/parse.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/parse.h b/py/parse.h
index 7326243ea..be2073ae5 100644
--- a/py/parse.h
+++ b/py/parse.h
@@ -62,4 +62,5 @@ typedef enum {
MP_PARSE_EVAL_INPUT,
} mp_parse_input_kind_t;
-mp_parse_node_t mp_parse(struct _mp_lexer_t *lex, mp_parse_input_kind_t input_kind);
+// returns MP_PARSE_NODE_NULL on error, and then exc_id_out and exc_msg_out are valid
+mp_parse_node_t mp_parse(struct _mp_lexer_t *lex, mp_parse_input_kind_t input_kind, qstr *exc_id_out, const char **exc_msg_out);