summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_parser.cpp
AgeCommit message (Collapse)Author
2017-09-17Move Variant::evaluate() switch to computed gotoHein-Pieter van Braam
In an effort to make GDScript a little faster replace the double switch() with a computed goto on compilers that set __GNUC__. For compilers that don't support computed goto it will fall back to regular switch/case statements. In addition disable using boolean values in a mathematical context. Now boolean values can only be compared with other booleans. Booleans will also no longer be coerced to integers. This PR replaces #11308 and fixes #11291
2017-09-02Fix typos 'a' and 'an'Poommetee Ketson
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-25Merge pull request #10581 from hpvb/fix-gcc6+Rémi Verschelde
Make cast_to a static member of Object.
2017-08-25Implemented, The Amazing Zylann Hack (tm), fixes #10603Juan Linietsky
2017-08-24Convert Object::cast_to() to the static versionHein-Pieter van Braam
Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24-Code completion for enumerationsJuan Linietsky
-Disabled GDNative and GDNativeScript so build compiles again
2017-08-22support enums and nested constants in match statementKarroffel
The initial version of the pattern matcher in GDScript does not allow matching on nested identifiers, only one identifiers available in the current scope. With the introduction of enums to GDScript that's a huge missing feature. This commit makes the parser accept indexed constants and variables to properly support enums.
2017-08-21Removed unnecessary assignmentsWilson E. Alvarez
2017-08-08push variable later when created, to avoid self-referencing as a valid case, ↵Juan Linietsky
closes #6111
2017-07-26Fix $a/b being parsed as divisionBojidar Marinov
2017-07-25fix a regression (GDScript) from e00630bKarroffel
This removes `not` from the variable safe list of keywords. Before that this was a valid expression: self.!(some_arg) The other fix is just a forgotten boolean negation.
2017-07-23Make GDScript allow some keywords as identifiersBojidar Marinov
Fixes #8085 Added some comments around the use of is_token_literal, as discussed.
2017-06-22Reimplement for..in range() so that it always results in intsBojidar Marinov
Fixes #8278, fixup of bfef8de1bc4f7a7b9617a7b181881129033a0b0e
2017-05-27GDScript: Use "is" keyword for type checking.Andreas Haas
Replaces the `extends` keyword with `is` in the context of testing for type compatibility. `extends` is still used for declaring class inheritance. Example: ```gdscript extends Node2D func _input(ev): if ev is InputEventKey: print("yay, key event") ```
2017-05-08Fix #8674, and rename a few things for clarityBojidar Marinov
2017-04-18Added autocomplete for file paths in the script editormbalint12
2017-04-08Fixup #8123, seems like I forgot a few thingsBojidar Marinov
Should close #8315 Please test, I'm still unsure I did it correctly...
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-04-05Fix typo in Parser Error messagecurtisxk38
2017-03-24Merge pull request #8123 from bojidar-bg/gdscript-inline-block-indentRémi Verschelde
Make inline blocks in GDScript more (or less) pythonic
2017-03-24Fix typos in source code using codespellRémi Verschelde
From https://github.com/lucasdemarchi/codespell
2017-03-23Make inline blocks in GDScript more pythonicBojidar Marinov
Fixes #8001
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-02-28Inf and NaN support added to GDScript.Saracen
2017-02-26Merge pull request #7809 from hpvb/fix-6798Rémi Verschelde
Allow preload to accept a const string.
2017-02-16Allow preload to accept a const string.Hein-Pieter van Braam
In preload() parsing this code will lookup the identifier in the local constant database. If the identifier corresponds to a string constant it is used as the path for preload(). Currently this does not work for global constants, only constants declared in the same class as the preload is happening. We can implement a full fix too. Maybe we can use this PR to discuss the possibilities. This (partially) fixes #6798
2017-02-15-begin of export work, not done yetJuan Linietsky
-fixes to make scenes exported from godot 2.x work
2017-02-04Fix parsing bug which causes range(variable) to crash the enginelonesurvivor
problem was a segmentation fault caused by trying to access Vector constants[0] which isn't there if op->arguments.size() is not bigger than one. - the changed OR condition didn't make sense (always true), should be AND - changes the "constant" variable to be false per default and gets set to true when there is actually something pushed to "constants"
2017-01-20made _ a special token in GDScriptkarroffel
2017-01-16Style: Various fixes to play nice with clang-formatRémi Verschelde
2017-01-15Style: Cosmetic fixes to play nice with clang-formatRémi Verschelde
2017-01-14Compile error when duplicate key in dictionery literal #7034James Mintram
2017-01-14Merge pull request #6845 from karroffel/masterJuan Linietsky
Adds pattern matching to GDScript
2017-01-14Merge pull request #4918 from jjay/f/error_on_redefineJuan Linietsky
Redefine var results in an error
2017-01-14Style: Fix whole-line commented codeRémi Verschelde
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
2017-01-11More efficient iteration syntax, and range() is converted behind the scenes ↵Juan Linietsky
to it.
2017-01-11Merge pull request #6930 from bojidar-bg/gdscript-export-array-hintRémi Verschelde
Allow typing hints for Array class (in GDScript and Inspector)
2017-01-11Both Array and Dictionary are always in shared mode (removed copy on write).Juan Linietsky
2017-01-11pattern matcher: Implemented backendKarroffel
changed comments
2017-01-11pattern matcher: Implemented transformationsKarroffel
2017-01-11pattern matching: implemented parserKarroffel
2017-01-10It is now possible to name layers of different kinds!Juan Linietsky
2017-01-08Fix code completion for new getnode syntaxJuan Linietsky
2017-01-08-Fix bugs related to PoolVector crashesJuan Linietsky
-Added ability to request nodes using $Name in GDScript :)
2017-01-02ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky
Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
2017-01-02Revert expression reduction from #7390Rémi Verschelde
Fixes #7412.
2017-01-02Merge pull request #7390 from bojidar-bg/gdscript-assign-errorRémi Verschelde
Disallow assignment to constants and expressions
2017-01-01Welcome in 2017, dear changelog reader!Rémi Verschelde
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
2016-12-29Disallow assignment to constants and expressionsBojidar Marinov
Fixes #6221, fixes #6824