summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gd_parser.cpp2
-rw-r--r--modules/gdscript/gd_tokenizer.cpp2
-rw-r--r--modules/nativescript/nativescript.cpp10
-rw-r--r--modules/nativescript/nativescript.h2
4 files changed, 12 insertions, 4 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 6e873c9197..ba0413a5a9 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -3283,7 +3283,7 @@ void GDParser::_parse_class(ClassNode *p_class) {
break;
}
- if (tokenizer->is_token_literal(0, true)) {
+ if (!tokenizer->is_token_literal(0, true)) {
_set_error("Expected identifier in signal argument.");
return;
}
diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp
index 1306addb17..5803046185 100644
--- a/modules/gdscript/gd_tokenizer.cpp
+++ b/modules/gdscript/gd_tokenizer.cpp
@@ -250,7 +250,7 @@ bool GDTokenizer::is_token_literal(int p_offset, bool variable_safe) const {
case TK_BUILT_IN_FUNC:
case TK_OP_IN:
- case TK_OP_NOT:
+ //case TK_OP_NOT:
//case TK_OP_OR:
//case TK_OP_AND:
diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp
index 493f21d75e..541fe951e4 100644
--- a/modules/nativescript/nativescript.cpp
+++ b/modules/nativescript/nativescript.cpp
@@ -958,7 +958,8 @@ void NativeReloadNode::_notification(int p_what) {
switch (p_what) {
case MainLoop::NOTIFICATION_WM_FOCUS_OUT: {
- print_line("unload");
+ if (unloaded)
+ break;
NSL->_unload_stuff();
for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) {
@@ -967,11 +968,14 @@ void NativeReloadNode::_notification(int p_what) {
NSL->library_classes.erase(L->key());
}
+ unloaded = true;
+
} break;
case MainLoop::NOTIFICATION_WM_FOCUS_IN: {
- print_line("load");
+ if (!unloaded)
+ break;
Set<StringName> libs_to_remove;
@@ -1010,6 +1014,8 @@ void NativeReloadNode::_notification(int p_what) {
}
}
+ unloaded = false;
+
for (Set<StringName>::Element *R = libs_to_remove.front(); R; R = R->next()) {
NSL->library_gdnatives.erase(R->get());
}
diff --git a/modules/nativescript/nativescript.h b/modules/nativescript/nativescript.h
index 5702ba2e8d..bc7a6e3ed6 100644
--- a/modules/nativescript/nativescript.h
+++ b/modules/nativescript/nativescript.h
@@ -259,6 +259,8 @@ inline NativeScriptDesc *NativeScript::get_script_desc() const {
class NativeReloadNode : public Node {
GDCLASS(NativeReloadNode, Node)
+ bool unloaded = false;
+
public:
static void _bind_methods();
void _notification(int p_what);