From 8c1731b67995add31361ae526b0e6af76346181e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 15 Feb 2014 21:16:33 -0300 Subject: -project settings are saved when changed -load() was in the GDScript docs but missing in the scripting-different music for platformer 2D and 3D -fix how documentation is generated, built in doc browser should be always up to date -copypaste, scrolling, etc in builtin doc -built-in scripts get saved now (though debugger may not always work on them) -Theme can be set to controls as a property --- script/gdscript/gd_parser.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'script/gdscript/gd_parser.cpp') diff --git a/script/gdscript/gd_parser.cpp b/script/gdscript/gd_parser.cpp index cfb324e1ae..e558ceb416 100644 --- a/script/gdscript/gd_parser.cpp +++ b/script/gdscript/gd_parser.cpp @@ -557,7 +557,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_ //indexing using "." - if (tokenizer.get_token(1)!=GDTokenizer::TK_IDENTIFIER) { + if (tokenizer.get_token(1)!=GDTokenizer::TK_IDENTIFIER && tokenizer.get_token(1)!=GDTokenizer::TK_BUILT_IN_FUNC ) { _set_error("Expected identifier as member"); return NULL; } else if (tokenizer.get_token(2)==GDTokenizer::TK_PARENTHESIS_OPEN) { @@ -566,7 +566,13 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_ op->op=OperatorNode::OP_CALL; IdentifierNode * id = alloc_node(); - id->name=tokenizer.get_token_identifier(1); + if (tokenizer.get_token(1)==GDTokenizer::TK_BUILT_IN_FUNC ) { + //small hack so built in funcs don't obfuscate methods + + id->name=GDFunctions::get_func_name(tokenizer.get_token_built_in_func(1)); + } else { + id->name=tokenizer.get_token_identifier(1); + } op->arguments.push_back(expr); // call what op->arguments.push_back(id); // call func -- cgit v1.2.3