summaryrefslogtreecommitdiff
path: root/py/lexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/lexer.h')
-rw-r--r--py/lexer.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/py/lexer.h b/py/lexer.h
index 13fbfb5d3..f41c962e7 100644
--- a/py/lexer.h
+++ b/py/lexer.h
@@ -136,5 +136,17 @@ bool mp_lexer_is_kind(mp_lexer_t *lex, mp_token_kind_t kind);
bool mp_lexer_show_error_pythonic_prefix(mp_lexer_t *lex);
bool mp_lexer_show_error_pythonic(mp_lexer_t *lex, const char *msg);
-// used to import a module; must be implemented for a specific port
-mp_lexer_t *mp_import_open_file(qstr mod_name);
+/******************************************************************/
+// platform specific import function; must be implemented for a specific port
+// TODO tidy up, rename, or put elsewhere
+
+//mp_lexer_t *mp_import_open_file(qstr mod_name);
+
+typedef enum {
+ MP_IMPORT_STAT_NO_EXIST,
+ MP_IMPORT_STAT_DIR,
+ MP_IMPORT_STAT_FILE,
+} mp_import_stat_t;
+
+mp_import_stat_t mp_import_stat(const char *path);
+mp_lexer_t *mp_lexer_new_from_file(const char *filename);