summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* GDScript: Fix type resolution not being return in some casesGeorge Marques2019-09-241-1/+2
| | | | | | Some situations caused the parser node type to not being update when trying to resolve the type, returning invalid data and breaking the parsing when it shouldn't. This patch fix the behavior.
* Changed some code found by Clang Tidy and Coverityqarmin2019-09-221-3/+0
|
* Merge pull request #32150 from luzpaz/typosRémi Verschelde2019-09-201-1/+1
|\ | | | | Fix misc. source comment typos
| * Fix misc. source comment typosluz.paz2019-09-191-1/+1
| | | | | | Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
* | Merge pull request #31921 from bojidar-bg/28978-uninitialized-array-valueRémi Verschelde2019-09-191-33/+44
|\ \ | | | | | | Fix uninitialized arrays and dictionaries retaining value
| * | Fix uninitialized arrays and dictionaries retaining valueBojidar Marinov2019-09-031-33/+44
| |/ | | | | | | Fixes #28978
* | Merge pull request #32100 from SaracenOne/gdscript_parent_const_typesRémi Verschelde2019-09-191-14/+21
|\ \ | | | | | | Fix const deceleration for inherited scripts above immediate parent
| * | Allow for constant deceleration to be detected inherited scripts above the ↵Saracen2019-09-111-14/+21
| |/ | | | | | | immediate parent.
* | Merge pull request #31934 from mitchcurtis/28187Rémi Verschelde2019-09-191-0/+9
|\ \ | | | | | | Produce an error when a class has the same name as a Singleton
| * | Produce an error when a class has the same name as a SingletonMitch Curtis2019-09-061-0/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you somehow end up with a Singleton.gd that looks like this: extends Node class_name Singleton func foo(): pass You will get an error when using it in another file: extends Node2D func _init(): # Parser Error: Non-static function "foo" can only be called from an instance. Singleton.foo() This error is confusing. This patch ensures that an error on the class_name line will be produced: Parse Error: The class "Singleton" conflicts with the AutoLoad singleton of the same name, and is therefore redundant. Remove the class_name declaration to fix this error. Fixes #28187.
* / GDScript: add an optional message parameter to assert()Mitch Curtis2019-09-111-6/+27
|/ | | | | | | | | | | | | | | | | Before this patch, assert() only took the condition to assert on: assert(item_data) Now, it can optionally take a string that will be printed upon failure: assert(item_data, item_name + " has no item data in ItemDatabase") This makes it easier to immediately see what the issue is by being able to write informative failure messages. Thanks to @wiped1 for sharing their patch, upon which this is based. Closes #17082
* Merge pull request #31893 from bojidar-bg/25081-gdscript-index-selfRémi Verschelde2019-09-021-1/+1
|\ | | | | Re-allow indexing on objects and other non-builtin types
| * Re-allow indexing on "self" and object types in GDScriptBojidar Marinov2019-09-021-1/+1
| | | | | | | | Fixes #25081
* | Merge pull request #31843 from 2shady4u/parserCtrlClickRémi Verschelde2019-09-021-1/+11
|\ \ | | | | | | Solves ctrl+click on functions by ignoring the cursor
| * | Solves ctrl+click on functions by ignoring the cursorshaderbeast2019-09-021-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obeyed CLANG format rules Obeying CLANG format rules attempt 2 Obeying CLANG format rules attempt 3 Clean up Fixed runaway while loop Removed int initialization
* | | Merge pull request #24925 from Mr-Slurpy/typed-autoloadRémi Verschelde2019-09-021-2/+67
|\ \ \ | |_|/ |/| | Added autoloads as a potential type.
| * | Added autoloads as a potential type.Daniel Eliasinski2019-01-111-2/+67
| | |
* | | Merge pull request #31738 from bojidar-bg/31056-class_name-extendsRémi Verschelde2019-08-291-1/+1
|\ \ \ | | | | | | | | Remove check for class_name and extends order
| * | | Remove check for class_name and extends orderBojidar Marinov2019-08-281-1/+1
| | | | | | | | | | | | | | | | Closes #31056
* | | | Merge pull request #29780 from GodotExplorer/gdscript-lspRémi Verschelde2019-08-281-0/+4
|\ \ \ \ | |/ / / |/| | | Add Language Server Protocol for GDScript
| * | | Add GDScript Language Protocol plugingeequlim2019-08-111-0/+4
| | | |
* | | | Make 'break' and 'continue' be marked as safeMichael Alexsander Silva Dias2019-08-271-2/+4
| | | |
* | | | Improve writing style in GDScript error/warning messagesHugo Locurcio2019-08-231-224/+224
| | | | | | | | | | | | | | | | This uses double quotes everywhere for consistency.
* | | | Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'Rémi Verschelde2019-08-171-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is (conditionally defines the error message). There are a few ERR_EXPLAINC calls for C-strings where String is not included which can stay as is to avoid adding additional _MSGC macros just for that. Part of #31244.
* | | Merge pull request #31227 from profan/fix/err-explain-usagesRémi Verschelde2019-08-091-10/+4
|\ \ \ | | | | | | | | Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories.
| * | | Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-091-10/+4
| | |/ | |/| | | | | | | "modules/gdnative", "modules/gdscript" directories.
* / | Expression before 'is' may be nullCameron Reikes2019-08-091-0/+4
|/ /
* | Merge pull request #31041 from 2shady4u/masterRémi Verschelde2019-08-051-0/+1
|\ \ | | | | | | Mark class_name line as safe in editor
| * | Mark class_name line as safe in editorshaderbeast2019-08-021-0/+1
| | |
* | | Merge pull request #30576 from qarmin/lgtm_coverageRémi Verschelde2019-07-201-2/+0
|\ \ \ | | | | | | | | Changed some code reported by LGTM and Coverity
| * | | Changed some code showed in LGTM and Coverageqarmin2019-07-201-2/+0
| |/ /
* / / Fix unreachable code detection in match statementsShiqing2019-07-131-2/+19
|/ /
* | Merge pull request #30352 from bojidar-bg/28727-enum-value-checkRémi Verschelde2019-07-061-0/+3
|\ \ | | | | | | Fix parsing of enums allowing for juxtaposed identifiers
| * | Fix parsing of enums allowing for juxtaposed identifiersBojidar Marinov2019-07-051-0/+3
| | | | | | | | | | | | Fixes #28727
* | | Merge pull request #30289 from bojidar-bg/29586-class-name-constantRémi Verschelde2019-07-031-9/+14
|\ \ \ | | | | | | | | Fix inheriting from class_name messing up constants
| * | | Fix inheriting from class_name messing up constantsBojidar Marinov2019-07-031-9/+14
| |/ / | | | | | | | | | Fixes #29586
* / / Fix parsing of arguments in constant expressionsBojidar Marinov2019-07-031-20/+12
|/ / | | | | | | Fixes #8006
* | Merge pull request #29815 from NilsIrl/plus_file_1Rémi Verschelde2019-07-011-1/+1
|\ \ | | | | | | Replace ` + "/" + ` with `String::file_add()`
| * | Replace ` + "/" + ` with `String::file_add()`Nils ANDRÉ-CHANG2019-06-231-1/+1
| | |
* | | Fixed regression bug caused in #30095 and actually fix the issue it was ↵unknown2019-06-281-19/+7
| | | | | | | | | | | | supposed to fix(#26850)
* | | Merge pull request #29941 from qarmin/redundant_code_and_othersRémi Verschelde2019-06-271-6/+3
|\ \ \ | | | | | | | | Remove redundant code, possible NULL pointers and others
| * | | Some code changed with Clang-Tidyqarmin2019-06-261-6/+3
| |/ /
* / / Fixed parser treating compound assignment the same as assignment which gave ↵unknown2019-06-261-2/+1
|/ / | | | | | | wrong argument usage count
* | Merge pull request #29306 from qarmin/small_code_fixesRémi Verschelde2019-06-121-1/+0
|\ \ | | | | | | Small fixes to unrechable code, possibly overflows, using NULL pointers
| * | Small fixes to unrechable code, possibly overflows, using NULL pointersqarmin2019-06-031-1/+0
| | |
* | | Merge pull request #29678 from akien-mga/err-macros-semicolonRémi Verschelde2019-06-111-1/+1
|\ \ \ | | | | | | | | Fix error macro calls not ending with semicolon
| * | | Fix error macro calls not ending with semicolonRémi Verschelde2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
* | | | Added export hint to 2D and 3D physics and render layers.MrCdK2019-06-071-0/+44
|/ / /
* | | Merge pull request #29433 from bojidar-bg/29406-dictionary-constantRémi Verschelde2019-06-031-0/+4
|\ \ \ | | | | | | | | Properly catch certain errors in Dictionary and Array declarations
| * | | Properly catch certain errors in Dictionary declarationsBojidar Marinov2019-06-031-0/+4
| |/ / | | | | | | | | | Fixes #29406