mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
py: Check explicitly for memory allocation failure in parser.
Previously, a failed malloc/realloc would throw an exception, which was not caught. I think it's better to keep the parser free from NLR (exception throwing), hence this patch.
This commit is contained in:
@@ -67,6 +67,7 @@ typedef enum {
|
||||
} mp_parse_input_kind_t;
|
||||
|
||||
typedef enum {
|
||||
MP_PARSE_ERROR_MEMORY,
|
||||
MP_PARSE_ERROR_UNEXPECTED_INDENT,
|
||||
MP_PARSE_ERROR_UNMATCHED_UNINDENT,
|
||||
MP_PARSE_ERROR_INVALID_SYNTAX,
|
||||
|
||||
Reference in New Issue
Block a user