[apps/code] The console marks imported script for the var box

After lauching the console, if we fetch a script we mark it as fetched.
When the variable box displays variables from imported scripts, it scans
all the variables from the scripts marked as fetched.
This commit is contained in:
Léa Saviot
2020-04-29 16:54:28 +02:00
committed by Émilie Feral
parent 9e973adbab
commit d1c8bbdaf7
13 changed files with 66 additions and 42 deletions

View File

@@ -288,7 +288,7 @@ void nlr_jump_fail(void *val) {
mp_lexer_t * mp_lexer_new_from_file(const char * filename) {
if (sScriptProvider != nullptr) {
const char * script = sScriptProvider->contentOfScript(filename);
const char * script = sScriptProvider->contentOfScript(filename, true);
if (script != nullptr) {
return mp_lexer_new_from_str_len(qstr_from_str(filename), script, strlen(script), 0 /* size_t free_len*/);
} else {
@@ -300,7 +300,7 @@ mp_lexer_t * mp_lexer_new_from_file(const char * filename) {
}
mp_import_stat_t mp_import_stat(const char *path) {
if (sScriptProvider && sScriptProvider->contentOfScript(path)) {
if (sScriptProvider && sScriptProvider->contentOfScript(path, false)) {
return MP_IMPORT_STAT_FILE;
}
return MP_IMPORT_STAT_NO_EXIST;