summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.h
AgeCommit message (Collapse)Author
2023-02-20Merge pull request #73590 from vnen/gdscript-global-scope-enumsRémi Verschelde
Make global scope enums accessible as types in GDScript
2023-02-19Make global scope enums accessible as types in GDScriptGeorge Marques
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.
2023-02-17GDScript: Rework type checkDmitrii Maganov
2023-02-05Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov
GDScript: Add warnings that are set to error by default (take 2)
2023-02-02GDScript: Add warnings that are set to error by defaultGeorge Marques
- 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.
2023-02-02GDScript: Improve usability of setter chainsGeorge Marques
- 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.
2023-02-01Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde
This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396. This caused multiple regressions. Needs to be redone with more testing before merge. Fixes #72501.
2023-02-01GDScript: Add warnings that are set to error by defaultGeorge Marques
- 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.
2023-01-31Merge pull request #72454 from dalexeev/gds-fix-icon-annotationRémi Verschelde
GDScript: Fix `@icon` annotation
2023-01-31GDScript: Fix `@icon` annotationDanil Alexeev
2023-01-31GDScript: Allow void functions to return calls to other void functionsGeorge Marques
2023-01-31GDScript: Fix issues with typed arraysDmitrii Maganov
2023-01-25GDScript: Allow constant expressions in annotationsDanil Alexeev
2023-01-23Merge pull request #71914 from vnen/gdscript-no-continue-matchRémi Verschelde
GDScript: Remove function of `continue` for match statement
2023-01-22GDScript: Remove function of `continue` for match statementGeorge Marques
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.
2023-01-21Add support for Unicode identifiers in GDScriptGeorge Marques
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.
2023-01-12Merge pull request #70987 from vonagam/fix-parameter-conversion-assignGeorge Marques
2023-01-09Assorted enum and native type fixesocean (they/them)
2023-01-06GDScript: Fix missing conversion for default argument valuesDmitrii Maganov
2023-01-06Unify typing of variables, constants and parameters in GDScriptDmitrii Maganov
2023-01-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-28Fix usage of Enum as constantDmitrii Maganov
2022-12-14GDScript: Allow out of order member resolutionrune-scape
2022-11-28Reset unassigned local variables to null in the loopsYuri Rubinsky
2022-11-24GDScript: Only check if ignoring warnings in debug buildRémi Verschelde
2022-11-22Fix using signals in lambda functionsYuri Rubinsky
2022-11-08Fix named enums to use int64 typeYuri Rubinsky
2022-10-25Fix enum type to use int64_t instead of int in GDScriptYuri Rubinsky
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-07-26[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli
- 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.
2022-07-13Merge pull request #62918 from cdemirer/parser-properly-set-node-extentsGeorge Marques
2022-07-11Add default argument bindings to GDScript annotationsYuri Sizov
2022-07-11Parser: Properly set node extentscdemirer
2022-07-06Merge pull request #62713 from YuriSizov/docs-scripting-annotationsRémi Verschelde
2022-07-05Add grouping annotations for class properties in GDScriptYuri Sizov
2022-07-04Add support for documenting built-in annotationsYuri Sizov
2022-05-27GDScript: Support `%` in shorthand for `get_node`George Marques
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.
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-12Fix incorrect precedence of pow operator in GDScript Yuri Rubinsky
2022-05-11Implement exponential operator (**) to GDScript/ExpressionsYuri Roubinsky
2022-04-24GDScript: Allow using self in lambdasGeorge Marques
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-03-30Fix autocompletion of static methods in built-in types in GDScriptYuri Roubinsky
2022-02-03GDScript: Consolidate behavior for assigning enum typesGeorge Marques
This makes sure that assigning values to enum-typed variables are consistent. Same enum is always valid, different enum is always invalid (without casting) and assigning `int` creates a warning if there is no casting. There are new test cases to ensure this behavior doesn't break in the future.
2022-01-10Merge pull request #55715 from nathanfranke/enum-orderedRémi Verschelde
2022-01-05Merge pull request #56483 from vnen/gdscript-warning-annotationRémi Verschelde
Add annotation to ignore warnings
2022-01-04GDScript: Add annotation to ignore warningsGeorge Marques
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!