summaryrefslogtreecommitdiffstatshomepage
path: root/py/scope.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-13 16:39:46 +0100
committerDamien George <damien.p.george@gmail.com>2016-04-18 15:09:34 +0100
commit61398ab45a2ef27ce44769b4259ee97b583f2978 (patch)
treef69060919c31a0e720f383470eb62d59fe8b9fb6 /py/scope.h
parent5bf649f37065ac0855f55f99496adb4cce63557d (diff)
downloadmicropython-61398ab45a2ef27ce44769b4259ee97b583f2978.tar.gz
micropython-61398ab45a2ef27ce44769b4259ee97b583f2978.zip
py: Implement parse bytecode.
Diffstat (limited to 'py/scope.h')
-rw-r--r--py/scope.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/py/scope.h b/py/scope.h
index fac936a729..e210a5a9cf 100644
--- a/py/scope.h
+++ b/py/scope.h
@@ -57,8 +57,7 @@ typedef enum { SCOPE_MODULE, SCOPE_FUNCTION, SCOPE_LAMBDA, SCOPE_LIST_COMP, SCOP
typedef struct _scope_t {
scope_kind_t kind;
struct _scope_t *parent;
- struct _scope_t *next;
- mp_parse_node_t pn;
+ const byte *pn; // points to the node after the scope index node
qstr source_file;
qstr simple_name;
mp_raw_code_t *raw_code;
@@ -75,7 +74,7 @@ typedef struct _scope_t {
id_info_t *id_info;
} scope_t;
-scope_t *scope_new(scope_kind_t kind, mp_parse_node_t pn, qstr source_file, mp_uint_t emit_options);
+scope_t *scope_new(scope_kind_t kind, const byte *pn, qstr source_file, mp_uint_t emit_options);
void scope_free(scope_t *scope);
id_info_t *scope_find_or_add_id(scope_t *scope, qstr qstr, bool *added);
id_info_t *scope_find(scope_t *scope, qstr qstr);