summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_parser.cpp
diff options
context:
space:
mode:
authoreska <eska@eska.me>2015-11-12 15:50:20 +0100
committereska <eska@eska.me>2015-11-12 15:50:20 +0100
commitbbc42a159c0e2ec04e317bb0766472e4d35e2819 (patch)
tree39f84350cb59eb4d048aa556aa5488b7548bd7c5 /modules/gdscript/gd_parser.cpp
parent1d7e9c4ba52250db3b0b0fd732e44074252045d2 (diff)
Allow extending from Object in GDScript
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
-rw-r--r--modules/gdscript/gd_parser.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 313fb57d0e..202ab76da0 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -1940,9 +1940,15 @@ void GDParser::_parse_extends(ClassNode *p_class) {
p_class->extends_used=true;
- //see if inheritance happens from a file
tokenizer->advance();
+ if (tokenizer->get_token()==GDTokenizer::TK_BUILT_IN_TYPE && tokenizer->get_token_type()==Variant::OBJECT) {
+ p_class->extends_class.push_back(Variant::get_type_name(Variant::OBJECT));
+ tokenizer->advance();
+ return;
+ }
+
+ // see if inheritance happens from a file
if (tokenizer->get_token()==GDTokenizer::TK_CONSTANT) {
Variant constant = tokenizer->get_token_constant();