summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #77744 from dalexeev/gds-reset-block-locals-on-exitRémi Verschelde2023-06-211-4/+9
|\ | | | | | | GDScript: Reset local variables on exit from block
| * GDScript: Reset local variables on exit from blockDanil Alexeev2023-06-021-4/+9
| |
* | Fix lambda parsing continuing on subsequent lines #73273今井きなみ2023-06-211-1/+1
| |
* | Merge pull request #77129 from dalexeev/gds-fix-static-var-bugs-part-1Rémi Verschelde2023-06-191-1/+9
|\ \ | | | | | | | | | GDScript: Fix some bugs with static variables and functions
| * | GDScript: Fix some bugs with static variables and functionsDanil Alexeev2023-06-161-1/+9
| | |
* | | Merge pull request #76207 from dalexeev/clarify-rpc-docsFabio Alessandrelli2023-06-181-12/+7
|\ \ \ | | | | | | | | Clarify `@rpc` annotation arguments docs
| * | | Clarify `@rpc` annotation arguments docsDanil Alexeev2023-06-131-12/+7
| | | |
* | | | Merge pull request #75051 from AleryBerry/fix-error-message-lua-styleRémi Verschelde2023-06-181-2/+2
|\ \ \ \ | |_|/ / |/| | | | | | | GDScript: Fix error message for LUA-style dictionary
| * | | GDScript: Fix error message for Lua-style dictionaryAleryBerry2023-03-201-2/+2
| | | |
* | | | 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
* | | GDScript: Fix doc comment parsing (newlines and spaces)Danil Alexeev2023-06-051-109/+179
| |/ |/|
* | Merge pull request #75943 from adamscott/fix-missing-script-type-nullptr-checkRémi Verschelde2023-05-221-1/+1
|\ \ | | | | | | | | | Add missing `script_type` `nullptr` check
| * | Add missing `script_type` `nullptr` checkAdam Scott2023-04-111-1/+1
| | | | | | | | | | | | Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
* | | Rework Navigation Avoidancesmix82023-05-101-0/+1
| | | | | | | | | | | | Rework Navigation Avoidance.
* | | Add support for static variables in GDScriptGeorge Marques2023-04-271-28/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #72095 from anvilfolk/gd-docsYuri Sizov2023-04-261-3/+14
|\ \ \ | | | | | | | | Improve GDScript documentation generation & behavior
| * | | Improve and fix GDScript documentation generation & behaviorocean (they/them)2023-04-211-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #75605 from anvilfolk/type-baseRémi Verschelde2023-04-241-3/+0
|\ \ \ \ | |/ / / |/| | | | | | | Make GDScript type not found errors more informative.
| * | | Make type not found errors more informative.ocean (they/them)2023-04-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR removes a check for whether a datatype is a meta type when generating a datatype's to_string() result. This means that error messages that fail to find the type will now print their class names, which is much more useful when trying to identify errors.
* | | | GDScript: Add some checks for `@tool` and `@icon`Danil Alexeev2023-04-201-0/+16
| | | |
* | | | Merge pull request #72979 from dalexeev/gds-annotation-parsingYuri Sizov2023-04-171-17/+22
|\ \ \ \ | | | | | | | | | | GDScript: Fix and improve annotation parsing
| * | | | GDScript: Fix and improve annotation parsingDanil Alexeev2023-04-141-17/+22
| | |/ / | |/| |
* | | | Merge pull request #62830 from ajreckof/access-identifier-keywordsYuri Sizov2023-04-171-0/+3
|\ \ \ \ | |/ / / |/| | | fix access to identifiers that are reserved keywords
| * | | fix access to identifiers that are reserved keywordsajreckof2023-04-141-0/+3
| |/ /
* / / Fix mistakes in documentation and GDScript errorsVolTer2023-04-101-6/+5
|/ /
* / GDScript: Change parser representation of class extendsDmitrii Maganov2023-03-131-3/+3
|/
* Merge pull request #73410 from MewPurPur/Fixin-error-spam-2-Electric-BoogalooRémi Verschelde2023-03-081-1/+1
|\ | | | | | | Fix error spam when naming a func at the end of the script
| * Fix error spam when naming a func at the end of the scriptVolTer2023-03-071-1/+1
| |
* | GDScript: Fix parsing unexpected break/continue in lambdaDmitrii Maganov2023-02-231-0/+13
| |
* | GDScript: Rework type checkDmitrii Maganov2023-02-171-7/+26
|/
* GDScript: Remove `treat_warnings_as_errors` project settingDanil Alexeev2023-02-101-1/+1
|
* Merge pull request #72971 from vnen/gdscript-multiline-commentRémi Verschelde2023-02-091-15/+51
|\ | | | | | | GDScript: Allow strings as multiline comments
| * GDScript: Allow strings as multiline commentsGeorge Marques2023-02-091-15/+51
| | | | | | | | Bring back the behavior in 3.x that was left out by oversight.
* | GDScript: Be more lenient with identifiersGeorge Marques2023-02-091-2/+14
|/ | | | | | - Allow identifiers similar to keywords if they are in ASCII range. - Allow constants to be treated as regular identifiers. - Allow keywords that can be used as identifiers in expressions.
* GDScript: Improve validation and documentation of `@export_flags`Danil Alexeev2023-02-071-13/+40
|
* Merge pull request #72804 from vnen/gdscript-no-onready-without-nodeYuri Sizov2023-02-061-1/+1
|\ | | | | GDScript: Fix inheritance check of @onready for inner classes
| * GDScript: Fix inheritance check of @onready for inner classesGeorge Marques2023-02-061-1/+1
| |
* | Merge pull request #72708 from KoBeWi/PackedMultilineStringArrayYuri Sizov2023-02-061-0/+7
|\ \ | |/ |/| Fix @export_multiline for PackedStringArray
| * Fix @export_multiline for PackedStringArraykobewi2023-02-041-0/+7
| |
* | Merge pull request #72330 from MinusKube/unreachable_code_bugRémi Verschelde2023-02-061-0/+8
|\ \ | | | | | | | | | Fix unreachable code warning for elif block
| * | Fix unreachable code warning for elif blockMinusKube2023-01-291-0/+8
| | |
* | | Merge pull request #72794 from vnen/gdscript-no-onready-without-nodeRémi Verschelde2023-02-061-0/+4
|\ \ \ | | | | | | | | | | | | GDScript: Don't allow @onready without inheriting Node
| * | | GDScript: Don't allow @onready without inheriting NodeGeorge Marques2023-02-061-0/+4
| | | |
* | | | GDScript: Better handling of `@rpc` annotation and autocompletionDanil Alexeev2023-02-051-11/+31
|/ / /
* | | Merge pull request #72608 from vnen/gdscript-warning-default-errorYuri Sizov2023-02-051-7/+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-7/+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.
* / | Improve docs for rpc annotationsGeroVeni2023-02-041-1/+1
|/ /
* | GDScript: Fix crash in export group annotationsDanil Alexeev2023-02-021-1/+6
| |
* | Revert "GDScript: Add warnings that are set to error by default"Rémi Verschelde2023-02-011-7/+7
| | | | | | | | | | | | | | | | | | 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-7/+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.