-properly handle newline in \ (line continuation) in gdscript, fixes #2112

-also fix a small crash in export detection with scripts that include themselves
This commit is contained in:
Juan Linietsky 2016-01-02 13:56:58 -03:00
parent 27c47e09a1
commit 0e0a7c9494
2 changed files with 12 additions and 17 deletions

View file

@ -33,17 +33,6 @@
#include "os/file_access.h"
#include "io/file_access_encrypted.h"
/* TODO:
*populate globals
*do checks as close to debugger as possible (but don't do debugger)
*const check plz
*check arguments and default arguments in GDFunction
-get property list in instance?
*missing opcodes
-const checks
-make thread safe
*/
@ -1740,16 +1729,21 @@ bool GDScript::_update_exports() {
}
}
Ref<GDScript> bf = ResourceLoader::load(path);
if (path!=get_path()) {
if (bf.is_valid()) {
Ref<GDScript> bf = ResourceLoader::load(path);
//print_line("parent is: "+bf->get_path());
base_cache=bf;
bf->inheriters_cache.insert(get_instance_ID());
if (bf.is_valid()) {
//bf->_update_exports(p_instances,true,false);
//print_line("parent is: "+bf->get_path());
base_cache=bf;
bf->inheriters_cache.insert(get_instance_ID());
//bf->_update_exports(p_instances,true,false);
}
} else {
ERR_PRINT(("Path extending itself in "+path).utf8().get_data());
}
}

View file

@ -260,6 +260,7 @@ void GDTokenizerText::_advance() {
}
INCPOS(1);
line++;
while(GETCHAR(0)==' ' || GETCHAR(0)=='\t') {
INCPOS(1);