summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.h
Commit message (Collapse)AuthorAgeFilesLines
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-2/+4
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Merge pull request #37020 from aaronfranke/rangeRémi Verschelde2020-05-101-1/+1
|\ | | | | Allow using integer vectors for iteration and make range() use them
| * Change get_completion_identifier_is_function to return a boolAaron Franke2020-05-091-1/+1
| | | | | | | | A minor bugfix
* | more clearer unexpected statement end error messagesThakee Nathees2020-05-101-0/+1
|/
* export var type reduce() implementedThakee Nathees2020-04-271-0/+1
|
* Replace NULL with nullptrlupoDharkael2020-04-021-12/+12
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Allow mixed tabs and spaces when indentation does not depend on tab sizeBojidar Marinov2019-10-251-1/+21
| | | | (hopefully) Closes #30937, fixes #32612
* Merge pull request #31921 from bojidar-bg/28978-uninitialized-array-valueRémi Verschelde2019-09-191-0/+1
|\ | | | | Fix uninitialized arrays and dictionaries retaining value
| * Fix uninitialized arrays and dictionaries retaining valueBojidar Marinov2019-09-031-0/+1
| | | | | | | | Fixes #28978
* | GDScript: add an optional message parameter to assert()Mitch Curtis2019-09-111-1/+6
|/ | | | | | | | | | | | | | | | | 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
* Add GDScript Language Protocol plugingeequlim2019-08-111-0/+1
|
* Merge pull request #30289 from bojidar-bg/29586-class-name-constantRémi Verschelde2019-07-031-1/+1
|\ | | | | Fix inheriting from class_name messing up constants
| * Fix inheriting from class_name messing up constantsBojidar Marinov2019-07-031-1/+1
| | | | | | | | Fixes #29586
* | Fix parsing of arguments in constant expressionsBojidar Marinov2019-07-031-1/+1
|/ | | | Fixes #8006
* Prevent using multiple class_name in a classlupoDharkael2019-04-161-0/+2
|
* Revert "Forbid implicit type conversion in GDScript"Rémi Verschelde2019-03-041-1/+1
|
* GDScript: Forbid implicit type conversionGeorge Marques2019-03-031-1/+1
| | | | | Since types are not present in release builds, this could cause issues where a variable does not have the exact defined type.
* Add a dependency search mode for GDScript parserGeorge Marques2019-03-031-1/+5
| | | | | | | | - This mode avoids loading any other resource. - Search for class_name now uses this mode, to avoid loading in the scan thread. - Implement get_dependencies() for GDScript loader, now exporting dependencies only should include the preloaded resources.
* Merge pull request #25018 from AllanDaemon/#24895George Marques2019-02-241-0/+1
|\ | | | | Fix support for optional parameters in setters
| * Fix #24895 (support for optional parameters in setters)Allan Daemon2019-01-231-0/+1
| |
* | GDScript: Remove unused `switch`, `case` and `do` CF keywordsRémi Verschelde2019-02-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | They had been reserved for future implementation, but we now have the `match` CF keyword which does the same and more. According to @reduz `do` was even added by mistake when copying from the shader language parser, it was never intended to add support for `do`... `while` loops, as the syntax would be awkward in GDScript, and the added sugar is not worth it. Fixes #25787.
* | Fix many asan and ubsan reported issuesHein-Pieter van Braam2019-01-301-0/+2
|/ | | | | | | | | This allows most demos to run without any ubsan or asan errors. There are still some things in thirdpart/ and some things in AudioServer that needs a look but this fixes a lot of issues. This should help debug less obvious issues, hopefully. This fixes #25217 and fixes #25218
* GDScript: fix type-check of indexed valuesGeorge Marques2019-01-161-1/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix various Clang 7 warnings about unused stuffRémi Verschelde2018-10-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Namely: [-Wunneeded-internal-declaration] [-Wunused-comparison] [-Wunused-const-variable] [-Wunused-function] [-Wunused-private-fields] Fixes the following Clang 7 warnings: ``` editor/plugins/script_editor_plugin.cpp:1417:20: warning: function '_find_node_with_script' is not needed and will not be emitted [-Wunneeded-internal-declaration] editor/scene_tree_dock.cpp:1859:14: warning: function '_find_last_visible' is not needed and will not be emitted [-Wunneeded-internal-declaration] modules/gdscript/gdscript_parser.cpp:7838:19: warning: equality comparison result unused [-Wunused-comparison] scene/resources/mesh.cpp:549:35: warning: unused variable '_array_types' [-Wunused-const-variable] scene/resources/mesh.cpp:563:18: warning: unused variable '_format_translate' [-Wunused-const-variable] drivers/gles3/rasterizer_scene_gles3.cpp:54:28: warning: unused function 'store_transform2d' [-Wunused-function] core/io/file_access_network.h:50:6: warning: private field 'ml' is not used [-Wunused-private-field] core/io/file_access_zip.h:93:14: warning: private field 'archive' is not used [-Wunused-private-field] core/io/resource_format_binary.h:122:6: warning: private field 'bin_meta_idx' is not used [-Wunused-private-field] core/message_queue.h:47:9: warning: private field 'mutex' is not used [-Wunused-private-field] main/tests/test_gui.cpp:63:11: warning: private field 'control' is not used [-Wunused-private-field] modules/gdscript/gdscript_parser.h:558:7: warning: private field 'completion_static' is not used [-Wunused-private-field] platform/x11/os_x11.h:148:11: warning: private field 'ip_unix' is not used [-Wunused-private-field] platform/x11/os_x11.h:180:7: warning: private field 'net_wm_icon' is not used [-Wunused-private-field] platform/x11/os_x11.h:189:6: warning: private field 'audio_driver_index' is not used [-Wunused-private-field] platform/x11/os_x11.h:190:15: warning: private field 'capture_idle' is not used [-Wunused-private-field] servers/physics/body_pair_sw.h:79:6: warning: private field 'cc' is not used [-Wunused-private-field] servers/visual/visual_server_raster.h:62:7: warning: private field 'draw_extra_frame' is not used [-Wunused-private-field] ```
* Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde2018-09-271-0/+2
| | | | | | | | | | | Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+3
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* GDScript: Allow `is` operator to test built-in typesGeorge Marques2018-08-261-0/+1
|
* Add custom icons to script classes.Will Nations2018-08-141-0/+1
|
* Added system for GDScript warningsGeorge Marques2018-08-101-0/+24
| | | | | | | - Count and panel per script. - Ability to disable warnings per script using special comments. - Ability to disable warnings globally using Project Settings. - Option to treat enabled warnings as errors.
* Add ability to infer variable type from assigned valueGeorge Marques2018-07-201-0/+2
| | | | | Syntax: var x : = 42 Infers the type of "x" to be an integer.
* Add editor highlight for type-safe linesGeorge Marques2018-07-201-1/+14
| | | | | The line number is hightlighted to indicate that the line contains only type-safe code.
* Use type information to enable GDScript introspectionGeorge Marques2018-07-201-42/+1
| | | | | This makes the Script API provide accurate information when requesting property or method info.
* Add static type checks in the parserGeorge Marques2018-07-201-27/+117
| | | | | | | | | | | | - Resolve types for all identifiers. - Error when identifier is not found. - Match return type and error when not returning a value when it should. - Check unreachable code (code after sure return). - Match argument count and types for function calls. - Determine if return type of function call matches the assignment. - Do static type check with match statement when possible. - Use type hints to determine export type. - Check compatibility between type hint and explicit export type.
* Store type hint of declared identifiersGeorge Marques2018-07-201-3/+45
|
* Move inheritance resolution to the parserGeorge Marques2018-07-201-0/+4
|
* Add typing syntaxGeorge Marques2018-07-201-70/+44
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-291-4/+4
|
* Revert "RPCMode refactor, more sync modes"Max Hilbrunner2018-05-291-4/+4
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-261-4/+4
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* GDScript: Refactor "GD" class prefix to "GDScript"Rémi Verschelde2017-11-161-0/+547