aboutsummaryrefslogtreecommitdiff
path: root/py/scope.h
diff options
context:
space:
mode:
authorDamien George2014-01-19 11:48:48 +0000
committerDamien George2014-01-19 11:48:48 +0000
commitcbd2f7482c8bf457cc17da763859dbba6e03e2a2 (patch)
tree8d6badc4197fe0d5763d381dd97586176db9fbae /py/scope.h
parente02b2d43912d13d216936786e4b7a33918877418 (diff)
py: Add module/function/class name to exceptions.
Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them.
Diffstat (limited to 'py/scope.h')
-rw-r--r--py/scope.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/scope.h b/py/scope.h
index 761a4d711..718ce46ec 100644
--- a/py/scope.h
+++ b/py/scope.h
@@ -38,6 +38,7 @@ typedef struct _scope_t {
struct _scope_t *parent;
struct _scope_t *next;
mp_parse_node_t pn;
+ qstr source_file;
qstr simple_name;
int id_info_alloc;
int id_info_len;
@@ -54,7 +55,7 @@ typedef struct _scope_t {
uint emit_options;
} scope_t;
-scope_t *scope_new(scope_kind_t kind, mp_parse_node_t pn, uint unique_code_id, uint emit_options);
+scope_t *scope_new(scope_kind_t kind, mp_parse_node_t pn, qstr source_file, uint unique_code_id, uint emit_options);
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);
id_info_t *scope_find_global(scope_t *scope, qstr qstr);