summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Replace most uses of Map by HashMapreduz2022-05-161-6/+6
| | | | | | | | | | | | * 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!
* Add a new HashMap implementationreduz2022-05-121-1/+1
| | | | | | | | | | | | | | | | | 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<>
* Fix incorrect precedence of pow operator in GDScript Yuri Rubinsky2022-05-121-0/+1
|
* Implement exponential operator (**) to GDScript/ExpressionsYuri Roubinsky2022-05-111-0/+2
|
* GDScript: Allow using self in lambdasGeorge Marques2022-04-241-0/+2
|
* Fix some issues found by cppcheck.bruvzg2022-04-061-1/+1
|
* Fix autocompletion of static methods in built-in types in GDScriptYuri Roubinsky2022-03-301-1/+1
|
* GDScript: Consolidate behavior for assigning enum typesGeorge Marques2022-02-031-4/+1
| | | | | | | | | | 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.
* Merge pull request #55715 from nathanfranke/enum-orderedRémi Verschelde2022-01-101-1/+1
|\
| * Use OrderedHashMap for enum_valuesNathan Franke2021-12-161-1/+1
| |
* | Merge pull request #56483 from vnen/gdscript-warning-annotationRémi Verschelde2022-01-051-0/+2
|\ \ | | | | | | Add annotation to ignore warnings
| * | GDScript: Add annotation to ignore warningsGeorge Marques2022-01-041-0/+2
| |/
* / Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Don't return reference on copy assignment operatorsRémi Verschelde2021-11-301-2/+1
| | | | | | | | | | | | | We prefer to prevent using chained assignment (`T a = b = c = T();`) as this can lead to confusing code and subtle bugs. According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++ allows any arbitrary return type, so this is standard compliant. This could be re-assessed if/when we have an actual need for a behavior more akin to that of the C++ STL, for now this PR simply changes a handful of cases which were inconsistent with the rest of the codebase (`void` return type was already the most common case prior to this commit).
* GDScript: Report property type errorsZuBsPaCe2021-10-081-2/+2
| | | | | | | | | Inline getters & setters are now FunctionNodes. Their names are set in the parser, not in the compiler. GDScript-Analyzer will now run through getter and setter. Also report wrong type or signature errors regarding getset properties. Added GDScript tests for getters and setters. #53102
* Merge pull request #52906 from vnen/gdscript-show-error-on-yieldRémi Verschelde2021-09-211-0/+1
|\
| * GDScript: Show specific error when "yield" is usedGeorge Marques2021-09-211-0/+1
| | | | | | | | | | To help people porting code, it gives a hint to use "await" instead of a generic error.
* | GDScript: Allow classes declaration to be done in single lineGeorge Marques2021-09-211-1/+1
|/ | | | | Incidentally, allow multiple statements in single line functions when using semicolon as a terminator.
* Merge pull request #51671 from RandomShaper/fix_gdscript_crashGeorge Marques2021-09-171-0/+4
|\ | | | | Fix some GDScript bugs
| * Implement iterator variable typing in GDScriptPedro J. Estébanez2021-09-111-0/+4
| |
* | [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-071-3/+3
|/ | | | | | | | | | | Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".
* Remove underscore hacksMax Hilbrunner2021-08-171-1/+0
| | | | | | Way less cruft. :) Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-1/+1
|
* [Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli2021-07-201-2/+1
| | | | | | | | | | | | | | | | - Move the "sync" property for RPCs to RPCConfig. - Unify GDScript annotations into a single one: - `@rpc(master)` # default - `@rpc(puppet)` - `@rpc(any)` # former `@remote` - Implement three additional `@rpc` options: - The second parameter is the "sync" option (which also calls the function locally when RPCing). One of "sync", "nosync". - The third parameter is the transfer mode (reliable, unreliable, ordered). - The third parameter is the channel (unused for now).