summaryrefslogtreecommitdiff
path: root/py/parsenum.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/parsenum.c')
-rw-r--r--py/parsenum.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/parsenum.c b/py/parsenum.c
index da63825e4..a72829b20 100644
--- a/py/parsenum.c
+++ b/py/parsenum.c
@@ -145,16 +145,16 @@ overflow:
goto have_ret_val;
}
-value_error:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+value_error: ;
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_obj_t exc = mp_obj_new_exception_msg(&mp_type_ValueError,
translate("invalid syntax for integer"));
raise_exc(exc, lex);
- } else if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL) {
+ #elif MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL
mp_obj_t exc = mp_obj_new_exception_msg_varg(&mp_type_ValueError,
translate("invalid syntax for integer with base %d"), base);
raise_exc(exc, lex);
- } else {
+ #else
vstr_t vstr;
mp_print_t print;
vstr_init_print(&vstr, 50, &print);
@@ -163,7 +163,7 @@ value_error:
mp_obj_t exc = mp_obj_new_exception_arg1(&mp_type_ValueError,
mp_obj_new_str_from_vstr(&mp_type_str, &vstr));
raise_exc(exc, lex);
- }
+ #endif
}
typedef enum {