aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorDamien George2014-01-03 14:03:48 +0000
committerDamien George2014-01-03 14:03:48 +0000
commit66028ab6dcd1b2ec9504c3473d817649935a4a1e (patch)
treec441ee4d665b3218e235dec24dd5a66a6fe050ef /stm
parentaae7847508e2a9555ad3276c5cd4f42b2e66686c (diff)
Basic implementation of import.
import works for simple cases. Still work to do on finding the right script, and setting globals/locals correctly when running an imported function.
Diffstat (limited to 'stm')
-rw-r--r--stm/Makefile1
-rw-r--r--stm/lexerstm.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/stm/Makefile b/stm/Makefile
index 6868f85ba..be4ca8b3a 100644
--- a/stm/Makefile
+++ b/stm/Makefile
@@ -82,6 +82,7 @@ PY_O = \
objtuple.o \
objtype.o \
builtin.o \
+ builtinimport.o \
vm.o \
repl.o \
diff --git a/stm/lexerstm.c b/stm/lexerstm.c
index dfb84cca1..661dfb016 100644
--- a/stm/lexerstm.c
+++ b/stm/lexerstm.c
@@ -61,3 +61,8 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename, mp_lexer_file_buf_t *fb
fb->pos = 0;
return mp_lexer_new(filename, fb, (mp_lexer_stream_next_char_t)file_buf_next_char, (mp_lexer_stream_close_t)file_buf_close);
}
+
+mp_lexer_t *mp_import_open_file(qstr mod_name) {
+ printf("import not implemented\n");
+ return NULL;
+}