Commit Graph

578 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
HolonProduction 3f0ff0417c Autocompletion: Remove additional brace from utility function options 2025-04-15 13:25:28 +07:00
HolonProduction 4a0e40f6ea GDScript: Do phrase level recovery for match 2025-04-15 13:00:43 +07:00
HolonProduction e213737d66 LSP: Account for unicode identifiers 2025-04-15 09:51:50 +07:00
Thaddeus Crews bef5d1e4f8
Merge pull request #102218 from HolonProduction/dictionary-recovery
GDScript: Do phrase level recovery when parsing faulty dictionaries
2025-04-14 19:39:50 +07:00
Thaddeus Crews 9e158215d1
Merge pull request #96375 from HolonProduction/completion-callable-braces
Autocompletion: Don't add parenthesis if `Callable` is expected
2025-04-10 16:53:45 +07:00
Nolkaloid c1cdaf7b16
Add gdscript tests for callv with const arrays 2025-04-10 23:13:01 +07:00
HolonProduction e7487263ad Autocompletion: Don't add parenthesis if `Callable` is expected 2025-04-10 18:40:32 +07:00
Thaddeus Crews 4248411baf
Merge pull request #102521 from HolonProduction/cancel-await
GDScript: Cancel suspended functions when reloading a script
2025-04-08 12:32:52 +07:00
Danil Alexeev 7721e13a92
GDScript: Add constant `Array` and `Dictionary` constructors 2025-03-31 21:31:34 +07:00
HolonProduction b67dcb21fd GDScript: Return early when parsing invalid super call 2025-03-24 17:40:26 +07:00
HolonProduction d6da30e9c7 GDScript: Fix head class range to include `class_name` 2025-03-14 11:36:55 +07:00
Pablo Andres Fuente 5775d29ad8 Fix `SCRIPT ERROR/ERROR/WARNING` on test output
Also "fixing" some GDScript completion tests which
where named wrongly.
2025-03-06 13:44:48 +07:00
HolonProduction ca1e444bca GDScript: Do phrase level recovery when parsing faulty dictionaries 2025-03-06 11:35:56 +07:00
HolonProduction 676e4c9013 GDScript: Cancel suspended functions when reloading a script 2025-03-06 11:34:40 +07:00
Malcolm Anderson 8e8f93cf0c Display correct symbol in warning when unique name is used without @onready annotation
Add tests for `GET_NODE_DEFAULT_WITHOUT_ONREADY` warning with unique nodes

Small modifications to tests
2025-02-06 10:49:08 +07:00
Pāvels Nadtočajevs b50d9742c2 Fix `is_valid_float`, `Variant` parser, `Expression` parser, script highlighter, and `TextServer` not handing capital E in scientific notation. 2025-02-05 18:39:40 +07:00
HolonProduction 24912d2010 Autocompletion: Try to guess method return type even if subscript base has no value 2025-01-11 23:50:43 +07:00
Thaddeus Crews ab208af781
Merge pull request #100174 from Calinou/gdscript-add-deprecated-experimental-annotations
Tweak unknown annotation GDScript error for `@deprecated`/`@experimental`/`@tutorial`
2024-12-11 17:35:50 +07:00
Thaddeus Crews 79dd5179e3
Merge pull request #99887 from JackErb/gdscript-parser-error-fix
Improve misleading `Unexpected "x" in class body.` GDScript parser error
2024-12-10 14:15:50 +07:00
JackErb 13fcb05e7b Improve GDScript "unexpected token in class body" parser error
This parser error was misleading.

Fixes:
1. Now points at correct line
2. For identifiers, prints out `Identifier "%s"`
2024-12-09 21:01:46 +07:00
Hugo Locurcio 6095a37d64
Tweak unknown annotation GDScript error for `@deprecated`/`@experimental`/`@tutorial`
These annotations don't exist at a source level, so the error messages
point to the documentation comment syntax.
2024-12-09 22:18:35 +07:00
Danil Alexeev 7d65d0a908
GDScript: Add `@warning_ignore_start` and `@warning_ignore_restore` annotations 2024-12-06 15:37:02 +07:00
Rémi Verschelde 682c5c7d49
GDScript: Fix failing tests due to collision with #99490 formatting change 2024-11-29 23:10:02 +07:00
Rémi Verschelde b3a44a5567
Merge pull request #99490 from dalexeev/gds-tests-track-multiple-errors
GDScript: Support tracking multiple analyzer and runtime errors in tests
2024-11-29 22:02:02 +07:00
Thaddeus Crews 6eca2aa8d6
Merge pull request #99295 from HolonProduction/yet-another-lsp-violation
LSP: Fix spec violations that break the VSCode outline
2024-11-27 10:47:18 +07:00
Rémi Verschelde f2f48aaf36
Fix stringification of Projection 2024-11-25 21:10:32 +07:00
Thaddeus Crews 9b5c7e9efa Merge pull request #99545 from KoBeWi/Vector4.0
Fix stringification of Vector4
2024-11-25 13:22:33 +07:00
Thaddeus Crews ea3154a0d4 Merge pull request #99424 from dalexeev/core-fix-builtin-enum-const-binds
Core: Fix built-in enum constant bindings
2024-11-22 14:54:31 +07:00
kobewi e210313045 Fix stringification of Vector4 2024-11-22 21:44:30 +07:00
Danil Alexeev 03b05cf9ac
Core: Fix built-in enum constant bindings 2024-11-22 14:03:21 +07:00
Lazy-Rabbit-2001 ae853e1a42 Improve GDScript autocompletion for methods 2024-11-22 18:24:45 +07:00
Danil Alexeev f86dcd4e67
GDScript: Support tracking multiple analyzer and runtime errors in tests 2024-11-21 22:09:50 +07:00
Chaosus 0524e29b5c Fix crash when division by zero/modulo by zero happen on vectors 2024-11-21 20:24:43 +07:00
HolonProduction 2f620db1d8 LSP: Fix spec violations that break the VSCode outline 2024-11-15 20:00:28 +07:00
HolonProduction a389eb4608 Add back `AnimationPlayer.get_argument_options` 2024-11-15 13:06:59 +07:00
girdenis-p 413490c270 Fix analyzer pushing SHADOWED_VARIABLE warning for members shadowed in subclasses
This fixes a bug in the analyzer where it did not push the SHADOWED_VARIABLE_BASE_CLASS
warning for members shadowed by variable in subclass. It does this by comparing the class
which contains the shadowed member with the class containing the variable, and pushing
SHADOWED_VARIABLE only if the classes are the same. Additionally, SHADOWED_VARIABLE_BASE_CLASS
can take an extra symbol which helps to specify the line for non native base class.
2024-11-06 15:04:14 +07:00
Thaddeus Crews 363c0b5fec
Merge pull request #47502 from KoBeWi/add_0
Always add decimal when converting float to string
2024-10-31 20:14:39 +07:00
Danil Alexeev 4dc568856a
GDScript: Rework `GDScriptUtilityFunctions` macros 2024-10-25 17:46:38 +07:00
Thaddeus Crews 7444da766a
Merge pull request #97374 from rune-scape/get-native-static-callable
GDScriptNativeClass: Allow getting static function as callable
2024-10-24 13:23:01 +07:00
kobewi 5c0f2414cd Always add decimal when printing float 2024-10-23 15:00:21 +07:00
HolonProduction 140c6a612e GDScript: Fix annotation parsing adding new annotation entries 2024-10-13 22:43:06 +07:00
Haoyu Qiu 8086894a8e Create `.editorconfig` file only on project creation 2024-10-05 14:32:55 +07:00
Rémi Verschelde 336d91551d
Merge pull request #97281 from reptofrog/deadzone-new-default
Input: Change the default deadzone value for new actions from 0.5 to 0.2
2024-10-02 15:01:02 +07:00
Roman Morozov d532eecc81 Changed the default deadzone value for new actions from 0.5 to 0.2 2024-10-01 16:47:44 +07:00
Danil Alexeev 85dfd89653 Add `@export_tool_button` annotation for easily creating inspector buttons
Co-authored-by: jordi <creptthrust@gmail.com>
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
Co-authored-by: Mack <86566939+Macksaur@users.noreply.github.com>
2024-09-27 22:24:15 +07:00
rune-scape d3ad99d3d1 GDScriptNativeClass: Allow getting static function as callable 2024-09-23 10:56:53 +07:00
Rémi Verschelde 41066484ff
Merge pull request #96965 from Repiteo/style/gdscript-editorconfig
Style: Consolidate & migrate GDScript `.editorconfig`
2024-09-16 13:35:25 +07:00
Rémi Verschelde f7daa0fb2f
Merge pull request #96856 from RandomShaper/selfdestruct_correctness
Object: Let debug lock handle callee destruction within call chain gracefully
2024-09-16 13:35:06 +07:00
Pedro J. Estébanez bb77520599 Object: Add tests about the safety of tail destruction 2024-09-16 09:58:47 +07:00
Thaddeus Crews bf811db6c8
Style: Consolidate & migrate GDScript `.editorconfig`
• Moved to test project root so a new `.editorconfig` isn't constantly generated.
• Disable attributes only in the files which use invalid syntax deliberately
2024-09-13 11:12:17 +07:00
Thaddeus Crews b3d7960df4
Core: Fix `operator[]` for typed dictionaries 2024-09-12 11:10:17 +07:00
Rémi Verschelde 1ff2186fe9
Merge pull request #96666 from aXu-AP/unique-node-no-quotes
Remove unneeded quotes from autocomplete % nodes
2024-09-11 12:35:00 +07:00
aXu-AP 2525311538 Remove unneeded quotes from autocomplete % nodes
Removes unnecessary quotes for suggestions like $"%MyNode".
2024-09-07 17:49:20 +07:00
Rémi Verschelde 0b4ae20156
Merge pull request #78656 from Repiteo/typed-dictionary
Implement typed dictionaries
2024-09-06 22:38:13 +07:00
Rémi Verschelde d3be91e6ab
Merge pull request #89675 from dalexeev/gds-correct-unused-signal-warning
GDScript: Do not produce `UNUSED_SIGNAL` warning for common implicit uses
2024-09-05 18:34:45 +07:00
Rémi Verschelde 721d280b8a
Merge pull request #96326 from HolonProduction/completion-hacks-and-fixes
Autocompletion: Reintroduce enum options on assignment
2024-09-04 18:55:27 +07:00
Thaddeus Crews 9853a69144
Implement typed dictionaries 2024-09-04 10:27:26 +07:00
Rémi Verschelde 13a90e938f
Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
2024-09-03 17:38:06 +07:00
HolonProduction 171c522290 Autocompletion: reintroduce enum options on assignment 2024-08-30 13:46:48 +07:00
rune-scape 154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 +07:00
Danil Alexeev c1322d41e6
GDScript: Replace `assert()` with `Utils.check()` in tests 2024-08-28 17:41:52 +07:00
Rémi Verschelde 4e051ff6f7
Merge pull request #78178 from dalexeev/gds-add-non-tool-extends-tool-error
GDScript: Add warning if non-`@tool` class extends `@tool` class
2024-08-28 13:14:13 +07:00
HolonProduction c824403853 Autocompletion: enable string literal completion in subscripts 2024-08-27 13:02:09 +07:00
Rémi Verschelde 58505b0bce
Merge pull request #94082 from HolonProduction/completion-force
Autocompletion: Rework argument options string literal completion
2024-08-20 10:01:52 +07:00
rune-scape 6e8fa6dd50 GDScript: Fix common mismatched external parser errors 2024-07-31 12:54:16 +07:00
Rémi Verschelde b2facc018a
Merge pull request #94730 from dalexeev/gds-fix-while-locals-clearing
GDScript: Fix locals clearing after exiting `while` block
2024-07-26 13:44:09 +07:00
A Thousand Ships 8f3e2c96eb
[Core] Fix `Variant::construct` of `Object`
Variant type was not updated correctly causing leaks in ref-counted
2024-07-25 12:25:29 +07:00
Danil Alexeev 5350e1beaa
GDScript: Fix locals clearing after exiting `while` block 2024-07-25 12:10:37 +07:00
Rémi Verschelde 77e18da5ff
Merge pull request #94674 from dalexeev/gds-fix-incorrect-setter-call-for-ref-types
GDScript: Fix incorrect setter call for reference types
2024-07-24 10:17:45 +07:00
Danil Alexeev 8c82fd15d2
GDScript: Fix incorrect setter call for reference types 2024-07-24 10:37:35 +07:00
Danil Alexeev 638148a184
GDScript: Fix false positive cases of `ENUM_VARIABLE_WITHOUT_DEFAULT` 2024-07-22 21:45:01 +07:00
Rémi Verschelde c2b91e2986
Merge pull request #94327 from HolonProduction/underscore_identifier
GDScript: Restore support for `Token::UNDERSCORE` in identifiers
2024-07-17 11:44:01 +07:00
Rémi Verschelde aefd91ae42
Merge pull request #94138 from vnen/gdscript-simple-setter-chain-call-setter
GDScript: Call setter on simple setter chain without getter
2024-07-17 11:43:15 +07:00
HolonProduction 06e732c3ed GDScript: Restore support for `Token::UNDERSCORE` in identifiers 2024-07-15 10:04:11 +07:00
George Marques 87c90a573c
GDScript: Call setter on simple setter chain without getter
Fixes a bug where a member variable was being set directly before
calling the setter.
2024-07-09 13:01:59 +07:00
Rémi Verschelde 92320c9b73
Merge pull request #94025 from dalexeev/gds-fix-implicit-cast-typed-array-param
GDScript: Fix implicit cast to typed array when passing parameter
2024-07-09 16:47:20 +07:00
Rémi Verschelde daba91d8c6
Merge pull request #93897 from akien-mga/vformat-better-error-message
Core: Improve `vformat` error reporting on `sprintf` failure
2024-07-09 00:03:17 +07:00
A Thousand Ships f68ab70a6a
[GDScript] Fix `get_method` for lambda self `Callable`s 2024-07-08 18:01:54 +07:00
HolonProduction 0abd0ae364 Autocompletion: rework argument options string literal completion 2024-07-08 17:53:36 +07:00
Danil Alexeev b4cb7ec2bb
GDScript: Fix implicit cast to typed array when passing parameter 2024-07-07 13:43:09 +07:00
A Thousand Ships aa28782be3
[GDScript] Fix `get_argument_count` for lambda `Callable`s 2024-07-05 13:53:56 +07:00
Rémi Verschelde 496b7b8482
Core: Improve vformat error reporting on sprintf failure
And fix a few occurrences of formatting errors that led me to this.
2024-07-04 10:54:55 +07:00
Danil Alexeev 3f52871f70
GDScript: Add warning if non-`@tool` class extends `@tool` class 2024-07-04 10:31:01 +07:00
Danil Alexeev d15ed0bcbb
GDScript: Fix false positive `CONFUSABLE_CAPTURE_REASSIGNMENT` warnings 2024-06-28 16:41:32 +07:00
Danil Alexeev 68898dbcc9
GDScript: Add `CONFUSABLE_CAPTURE_REASSIGNMENT` warning 2024-06-28 11:12:01 +07:00
Rémi Verschelde de59dca156
Merge pull request #93384 from dalexeev/gds-fix-non-global-class-export
GDScript: Fix non-global class export
2024-06-21 13:55:23 +07:00
Rémi Verschelde 5ac2631af7
Merge pull request #92688 from HolonProduction/autocompletion-batch-2
Add more autocompletion tests
2024-06-21 10:14:13 +07:00
Danil Alexeev 24b6edcd38
GDScript: Fix non-global class export 2024-06-20 14:30:12 +07:00
HolonProduction 51f74af2ac Autocompletion: Add support for string name option in more places 2024-06-12 20:38:43 +07:00
PreslavPetrov 653a8b113a Register the export info correctly when a global class script is used as the variable type for Node 2024-06-03 13:28:17 +07:00
HolonProduction 48e297c144 Add more autocompletion tests 2024-06-02 15:52:21 +07:00
Danil Alexeev 18d8838051
GDScript: Fix subscript resolution on constant non-metatype GDScript base 2024-05-30 17:37:05 +07:00
Danil Alexeev 4b692959de
GDScript: Fix lambdas capturing non-local variables 2024-05-22 10:07:31 +07:00
Rémi Verschelde 6761923f4f
Merge pull request #90716 from dalexeev/gds-fix-export-annotation-issues
GDScript: Fix some export annotation issues
2024-05-19 11:21:00 +07:00
Danil Alexeev 7dd801c580
GDScript: Fix `STANDALONE_EXPRESSION` warning for `preload()` 2024-05-17 10:33:01 +07:00
Danil Alexeev 76b2d85c9f
GDScript: Fix some export annotation issues 2024-05-13 17:49:06 +07:00
Rémi Verschelde 7d03b1de0b
Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
2024-05-08 10:12:46 +07:00
Rémi Verschelde 4b070e8031
Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +07:00
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +07:00
Rémi Verschelde 76f642b962
Merge pull request #91412 from dalexeev/gds-fix-non-static-access-in-static-context
GDScript: Fix access non-static members in static context
2024-05-02 17:31:39 +07:00