mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py/compile: Convert scope test to SCOPE_IS_COMP_LIKE macro.
This macro can be used elsewhere.
This commit is contained in:
@@ -55,6 +55,7 @@ typedef struct _id_info_t {
|
||||
} id_info_t;
|
||||
|
||||
#define SCOPE_IS_FUNC_LIKE(s) ((s) >= SCOPE_LAMBDA)
|
||||
#define SCOPE_IS_COMP_LIKE(s) (SCOPE_LIST_COMP <= (s) && (s) <= SCOPE_GEN_EXPR)
|
||||
|
||||
// scope is a "block" in Python parlance
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user