summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-belowYuri Sizov2023-07-311-3/+8
|\ | | | | | | GDScript: Fix bug with identifier shadowed below in current scope
| * GDScript: Fix bug with identifier shadowed below in current scopeDanil Alexeev2023-07-261-3/+8
| |
* | Merge pull request #78941 from ↵Yuri Sizov2023-07-311-14/+28
|\ \ | | | | | | | | | | | | | | | dalexeev/gds-doc-comments-deprecated-and-experimental GDScript: Add `@deprecated` and `@experimental` doc comment tags
| * | GDScript: Add `@deprecated` and `@experimental` doc comment tagsDanil Alexeev2023-07-081-14/+28
| |/
* | Merge pull request #78254 from dalexeev/gds-fix-property-group-name-conflictYuri Sizov2023-07-311-1/+3
|\ \ | |/ |/| | | GDScript: Fix conflict between property and group names
| * GDScript: Fix conflict between property and group namesDanil Alexeev2023-06-151-1/+3
| |
* | Merge pull request #77744 from dalexeev/gds-reset-block-locals-on-exitRémi Verschelde2023-06-211-1/+1
|\ \ | | | | | | | | | GDScript: Reset local variables on exit from block
| * | GDScript: Reset local variables on exit from blockDanil Alexeev2023-06-021-1/+1
| |/
* / Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-4/+8
|/ | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* Add support for static variables in GDScriptGeorge Marques2023-04-271-8/+13
| | | | | | | | | | Which allows editable data associated with a particular class instead of the instance. Scripts with static variables are kept in memory indefinitely unless the `@static_unload` annotation is used or the `static_unload()` method is called on the GDScript. If the custom function `_static_init()` exists it will be called when the class is loaded, after the static variables are set.
* Improve and fix GDScript documentation generation & behaviorocean (they/them)2023-04-211-1/+1
| | | | | | Removes documentation generation (docgen) from the GDScript compiler to its own file. Adds support for GDScript enums and signal parameters and quite a few other assorted fixes and improvements.
* GDScript: Change parser representation of class extendsDmitrii Maganov2023-03-131-1/+1
|
* Merge pull request #73590 from vnen/gdscript-global-scope-enumsRémi Verschelde2023-02-201-0/+2
|\ | | | | | | Make global scope enums accessible as types in GDScript
| * Make global scope enums accessible as types in GDScriptGeorge Marques2023-02-191-0/+2
| | | | | | | | | | | | Add functions to CoreConstant so enums can be properly deduced. Also add the enums in release builds to make consistent with ClassDB enums and avoid differences in script compilation between debug and release.
* | GDScript: Rework type checkDmitrii Maganov2023-02-171-2/+15
|/
* Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov2023-02-051-4/+7
|\ | | | | GDScript: Add warnings that are set to error by default (take 2)
| * GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
* | GDScript: Improve usability of setter chainsGeorge Marques2023-02-021-0/+2
|/ | | | | | | | | - Consider PackedArrays non-shared since they are copied on C++/script boundaries. - Add error messages in the analyzer when assigning to read-only properties. - Add specific error message at runtime when assignment fails because the property is read-only.
* Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde2023-02-011-7/+4
| | | | | | | | | This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396. This caused multiple regressions. Needs to be redone with more testing before merge. Fixes #72501.
* GDScript: Add warnings that are set to error by defaultGeorge Marques2023-02-011-4/+7
| | | | | | | | | | | | | | | | | | | | | | | - Adds a list of default levels for all warning so they can be set individually. - Add warnings set by default to error for: - Using `get_node()` without `@onready`. - Using `@onready` together with `@export`. - Inferring a static type with a Variant value. - Overriding a native engine method. - Adjust how annotations to ignore warnings are treated so they also apply to method parameters. - Clean up a bit how ignored warnings are set. There were two sets but only one was actually being used. - Set all warnings to the `WARN` level for tests, so they they can be properly tested. - Fix enum types in native methods signatures being set to `int`. - Fix native enums being treated as Dictionary by mistake. - Make name of native enum types use the class they are defined in, not the direct super class of the script. This ensures they are always equal even when coming from different sources. - Fix error for signature mismatch that was only showing the first default argument as having a default. Now it shows for all.
* Merge pull request #72454 from dalexeev/gds-fix-icon-annotationRémi Verschelde2023-01-311-1/+1
|\ | | | | | | GDScript: Fix `@icon` annotation
| * GDScript: Fix `@icon` annotationDanil Alexeev2023-01-311-1/+1
| |
* | GDScript: Allow void functions to return calls to other void functionsGeorge Marques2023-01-311-0/+1
|/
* GDScript: Fix issues with typed arraysDmitrii Maganov2023-01-311-1/+1
|
* GDScript: Allow constant expressions in annotationsDanil Alexeev2023-01-251-1/+1
|
* Merge pull request #71914 from vnen/gdscript-no-continue-matchRémi Verschelde2023-01-231-2/+0
|\ | | | | | | GDScript: Remove function of `continue` for match statement
| * GDScript: Remove function of `continue` for match statementGeorge Marques2023-01-221-2/+0
| | | | | | | | | | | | The keyword is confusing and rarely is used in the intended way. It is removed now in favor of a future feature (pattern guards) to avoid breaking compatibility later.
* | Add support for Unicode identifiers in GDScriptGeorge Marques2023-01-211-1/+4
|/ | | | | | This is using an adapted version of UAX#31 to not rely on the ICU database (which isn't available in builds without TextServerAdvanced). It allows most characters used in diverse scripts but not everything.
* Merge pull request #70987 from vonagam/fix-parameter-conversion-assignGeorge Marques2023-01-121-1/+1
|\
| * GDScript: Fix missing conversion for default argument valuesDmitrii Maganov2023-01-061-1/+1
| |
* | Assorted enum and native type fixesocean (they/them)2023-01-091-2/+2
|/
* Unify typing of variables, constants and parameters in GDScriptDmitrii Maganov2023-01-061-20/+17
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix usage of Enum as constantDmitrii Maganov2022-12-281-0/+1
|
* GDScript: Allow out of order member resolutionrune-scape2022-12-141-20/+62
|
* Reset unassigned local variables to null in the loopsYuri Rubinsky2022-11-281-1/+1
|
* GDScript: Only check if ignoring warnings in debug buildRémi Verschelde2022-11-241-1/+2
|
* Fix using signals in lambda functionsYuri Rubinsky2022-11-221-0/+1
|
* Fix named enums to use int64 typeYuri Rubinsky2022-11-081-1/+1
|
* Fix enum type to use int64_t instead of int in GDScriptYuri Rubinsky2022-10-251-1/+1
|
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-10/+10
| | | | change warnings=all to use /W4.
* [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli2022-07-261-4/+2
| | | | | | | | | - RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
* Merge pull request #62918 from cdemirer/parser-properly-set-node-extentsGeorge Marques2022-07-131-7/+8
|\
| * Parser: Properly set node extentscdemirer2022-07-111-7/+8
| |
* | Add default argument bindings to GDScript annotationsYuri Sizov2022-07-111-1/+1
|/
* Merge pull request #62713 from YuriSizov/docs-scripting-annotationsRémi Verschelde2022-07-061-0/+1
|\
| * Add support for documenting built-in annotationsYuri Sizov2022-07-041-0/+1
| |
* | Add grouping annotations for class properties in GDScriptYuri Sizov2022-07-051-0/+21
|/
* GDScript: Support `%` in shorthand for `get_node`George Marques2022-05-271-2/+4
| | | | | | The `%` is used in scene unique nodes. Now `%` can also be used instead of `$` for the shorthand, besides being allowed generally anywhere in the path as the prefix for a node name.
* Add a new HashSet templatereduz2022-05-201-4/+4
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed