aboutsummaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-06-16 21:42:37 +1000
committerDamien George <damien@micropython.org>2020-06-16 21:42:37 +1000
commit0fd91e39b1711772c88cfe4e0aaf817fe3387ba6 (patch)
treea4ac9f1fa69ff7700eff32d30269b634a8d68f86 /py/compile.c
parentb4d0d7bf03a787237740b80d2ecdeb0a3ce1d4ff (diff)
py/compile: Convert scope test to SCOPE_IS_COMP_LIKE macro.
This macro can be used elsewhere.
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/compile.c b/py/compile.c
index 22f47ee0d..8835ec2f8 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -3083,7 +3083,7 @@ STATIC void compile_scope(compiler_t *comp, scope_t *scope, pass_kind_t pass) {
EMIT_ARG(load_const_tok, MP_TOKEN_KW_NONE);
}
EMIT(return_value);
- } else if (scope->kind == SCOPE_LIST_COMP || scope->kind == SCOPE_DICT_COMP || scope->kind == SCOPE_SET_COMP || scope->kind == SCOPE_GEN_EXPR) {
+ } else if (SCOPE_IS_COMP_LIKE(scope->kind)) {
// a bit of a hack at the moment
assert(MP_PARSE_NODE_IS_STRUCT(scope->pn));