summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
AgeCommit message (Collapse)Author
2023-03-14Fix error spam when naming a func at the end of the scriptVolTer
(cherry picked from commit 07dd627728b71dd3ea30bab9761a847a7e0c911e)
2023-02-23GDScript: Fix parsing unexpected break/continue in lambdaDmitrii Maganov
2023-02-17GDScript: Rework type checkDmitrii Maganov
2023-02-10GDScript: Remove `treat_warnings_as_errors` project settingDanil Alexeev
2023-02-09Merge pull request #72971 from vnen/gdscript-multiline-commentRémi Verschelde
GDScript: Allow strings as multiline comments
2023-02-09GDScript: Be more lenient with identifiersGeorge Marques
- 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.
2023-02-09GDScript: Allow strings as multiline commentsGeorge Marques
Bring back the behavior in 3.x that was left out by oversight.
2023-02-07GDScript: Improve validation and documentation of `@export_flags`Danil Alexeev
2023-02-06Merge pull request #72804 from vnen/gdscript-no-onready-without-nodeYuri Sizov
GDScript: Fix inheritance check of @onready for inner classes
2023-02-06Merge pull request #72708 from KoBeWi/PackedMultilineStringArrayYuri Sizov
Fix @export_multiline for PackedStringArray
2023-02-06GDScript: Fix inheritance check of @onready for inner classesGeorge Marques
2023-02-06Merge pull request #72330 from MinusKube/unreachable_code_bugRémi Verschelde
Fix unreachable code warning for elif block
2023-02-06Merge pull request #72794 from vnen/gdscript-no-onready-without-nodeRémi Verschelde
GDScript: Don't allow @onready without inheriting Node
2023-02-06GDScript: Don't allow @onready without inheriting NodeGeorge Marques
2023-02-05GDScript: Better handling of `@rpc` annotation and autocompletionDanil Alexeev
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-04Fix @export_multiline for PackedStringArraykobewi
2023-02-04Improve docs for rpc annotationsGeroVeni
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: Fix crash in export group annotationsDanil Alexeev
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-31GDScript: Fix `@icon` annotationDanil Alexeev
2023-01-31GDScript: Fix issues with typed arraysDmitrii Maganov
2023-01-30GDScript: Fix match branches return check on releaseGeorge Marques
The check for existence of `return` only existed on debug builds for match branches. This could lead on an invalid error after exporting. Now this is checked on relase too, so it works the same as the editor.
2023-01-30Merge pull request #72305 from dalexeev/gfs-fix-export-enumRémi Verschelde
GDScript: Fix `@export_enum` works only with `int`
2023-01-30GDScript: Fix `@export_enum` works only with `int`Danil Alexeev
2023-01-30Merge pull request #72175 from dalexeev/gds-fix-export-group-annotationsRémi Verschelde
GDScript: Fix broken export group annotations
2023-01-29Fix unreachable code warning for elif blockMinusKube
2023-01-28GDScript: Allow variables in match patternsGeorge Marques
To restore an ability available in 3.x and reduce compatibility changes.
2023-01-27GDScript: Fix broken export group annotationsDanil Alexeev
2023-01-25GDScript: Allow constant expressions in annotationsDanil Alexeev
2023-01-25Merge pull request #71120 from jordigcs/ternaryGeorge Marques
Closes https://github.com/godotengine/godot/issues/71065
2023-01-24Clarify error message about script-level annotationDanil 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-19Allow standalone ternary expressionsjordi
2023-01-16Merge pull request #67774 from aaronfranke/script-annotationsRémi Verschelde
Make script annotations be placed before `class_name` and `extends`
2023-01-13Merge pull request #70540 from vaartis/multiline-arrays-dictionariesRémi Verschelde
Implement export_multiline support for Array[String] and Dictionary
2023-01-12Merge pull request #70713 from vonagam/fix-unnamed-enum-outer-conflictsGeorge Marques
2023-01-09Merge pull request #69590 from anvilfolk/enumsRémi Verschelde
GDScript enum fixes & refactor
2023-01-09Assorted enum and native type fixesocean (they/them)
2023-01-09Merge pull request #70655 from vonagam/fix-assert-multilineRémi Verschelde
GDScript: Fix multiline and trailing comma for assert
2023-01-08GDScript: Fix multiline and trailing comma for assertDmitrii 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-29GDScript: Fix false name conflicts for unnamed enumsDmitrii Maganov
2022-12-25Implement export_multiline support for Array[String] and DictionaryEkaterina Vaartis
For arrays, specifically check if it's a string array and pass the type on to the editor. For dictionaries, save the hint on the type and use it later to draw the multiline editor, except for when adding a string key, because that doesn't make much sense. All string values however will be drawn as multiline.
2022-12-19Make script annotations placed before class_name and extendsAaron Franke