summaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-04-22 12:13:58 +1000
committerDamien George <damien@micropython.org>2021-04-27 23:51:52 +1000
commitd4b706c4d01377d42855ff1544ced77536f69caf (patch)
treecfdb78c011813396af745720c1a7754ac91487d7 /py/compile.c
parent30d9f77cc535306eeb9eed6f17e71355fd58995a (diff)
py: Add option to compile without any error messages at all.
This introduces a new option, MICROPY_ERROR_REPORTING_NONE, which completely disables all error messages. To be used in cases where MicroPython needs to fit in very limited systems. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/compile.c b/py/compile.c
index d1a4d65c8..1182b8b1e 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -2597,7 +2597,7 @@ STATIC void compile_atom_brace_helper(compiler_t *comp, mp_parse_node_struct_t *
compile_node(comp, pn_i);
if (is_dict) {
if (!is_key_value) {
- #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
+ #if MICROPY_ERROR_REPORTING <= MICROPY_ERROR_REPORTING_TERSE
compile_syntax_error(comp, (mp_parse_node_t)pns, MP_ERROR_TEXT("invalid syntax"));
#else
compile_syntax_error(comp, (mp_parse_node_t)pns, MP_ERROR_TEXT("expecting key:value for dict"));
@@ -2607,7 +2607,7 @@ STATIC void compile_atom_brace_helper(compiler_t *comp, mp_parse_node_struct_t *
EMIT(store_map);
} else {
if (is_key_value) {
- #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
+ #if MICROPY_ERROR_REPORTING <= MICROPY_ERROR_REPORTING_TERSE
compile_syntax_error(comp, (mp_parse_node_t)pns, MP_ERROR_TEXT("invalid syntax"));
#else
compile_syntax_error(comp, (mp_parse_node_t)pns, MP_ERROR_TEXT("expecting just a value for set"));