Commit graph

2887 commits

Author SHA1 Message Date
Rémi Verschelde b9bf46de9e
Merge pull request #82067 from dalexeev/gds-docgen-fix-metatypes-and-values
GDScript DocGen: Fix and improve appearance of metatypes and values
2023-10-05 10:07:43 +02:00
Rémi Verschelde 1e544505be
Merge pull request #82691 from YuriSizov/rst-validate-with-exceptions
Validate `code` tags for class and member references
2023-10-04 15:42:42 +02:00
Rémi Verschelde e41582f42f
Merge pull request #82547 from dalexeev/gds-fix-unsafe-call-arg-variant-constructors
GDScript: Fix `UNSAFE_CALL_ARGUMENT` warning for `Variant` constructors
2023-10-03 17:25:28 +02:00
Rémi Verschelde 2af3229ce7
Merge pull request #82516 from dalexeev/gds-improve-hl-types
GDScript: Improve highlighting of types
2023-10-03 17:24:32 +02:00
Rémi Verschelde 6de06138c0
Merge pull request #79425 from vnen/gdscript-load-classes-for-debug-tests
GDScript: Load global classes when running debug tests
2023-10-03 17:11:01 +02:00
Danil Alexeev e750c59cf8
GDScript: Improve highlighting of types 2023-10-03 17:32:27 +03:00
Yuri Sizov cc0eebd9d8 Validate code tags for class and member references
This commit also adds means to manually disable warnings
in `code` tags where it's a false positive with the new
`skip-lint` attribute.

Warnings are now enabled on CI to prevent future errors.
2023-10-03 15:48:31 +02:00
Jakub Janšta 74c937079c Add type_string() utility 2023-10-02 17:41:20 +02:00
Danil Alexeev ba96d4f631
GDScript: Fix UNSAFE_CALL_ARGUMENT warning for Variant constructors 2023-09-30 13:57:09 +03:00
Danil Alexeev aff767ef07
Fix expected argument count for Callable call errors 2023-09-29 20:00:10 +03:00
Yuri Sizov b25f1f9c79 Merge pull request #82477 from dalexeev/gds-covariance-and-contravariance
GDScript: Add return type covariance and parameter type contravariance
2023-09-28 20:04:37 +02:00
Yuri Sizov 78483a1df2 Merge pull request #82186 from dalexeev/gds-fix-property-duplication
GDScript: Fix duplication of inherited script properties
2023-09-28 20:04:18 +02:00
Yuri Sizov 73252669b1 Merge pull request #82030 from dalexeev/gds-make-for-loop-array-literal-typed
GDScript: Make array literal typed if `for` loop variable type is specified
2023-09-28 20:04:12 +02:00
Yuri Sizov 813cd1dfc8 Merge pull request #80085 from vnen/gdscript-pattern-guards
GDScript: Implement pattern guards for match statement
2023-09-28 20:03:57 +02:00
Danil Alexeev cb8b89fd95
GDScript: Add return type covariance and parameter type contravariance 2023-09-28 12:27:36 +03:00
Yuri Sizov aa474c9feb Merge pull request #75988 from dalexeev/gds-unsafe-call-argument
GDScript: Improve call analysis
2023-09-27 19:07:46 +02:00
George Marques 54a1414500
GDScript: Implement pattern guards for match statement
Within a match statement, it is now possible to add guards in each
branch:

	var a = 0
	match a:
		0 when false: print("does not run")
		0 when true: print("but this does")

This allows more complex logic for deciding which branch to take.
2023-09-27 11:25:25 -03:00
A Thousand Ships 517e9f8aef [Modules] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-26 16:44:52 +02:00
Rémi Verschelde 9b0b441cf3
Merge pull request #82139 from dalexeev/gds-add-inferred-declaration-warning
GDScript: Add `INFERRED_DECLARATION` warning
2023-09-26 16:36:39 +02:00
Chia-Hsiang Cheng ceda13720b Check if any global script class is shadowed by a variable 2023-09-26 16:47:17 +08:00
Rémi Verschelde 0c626bdfb0
Merge pull request #82294 from dalexeev/gds-fix-gdsnc-crash
GDScript: Fix crash with `GDScriptNativeClass`
2023-09-26 08:31:26 +02:00
Rémi Verschelde e4cfd4e26a
Merge pull request #82195 from AThousandShips/radian_fix
Replace `radians` range hint with `radians_as_degrees`
2023-09-25 17:18:38 +02:00
Rémi Verschelde 3e15c8f285
Merge pull request #81833 from 0x4448/fix-autocomplete-quotes
Fix autocomplete quotes
2023-09-25 17:18:23 +02:00
Rémi Verschelde 7a29189858
Merge pull request #81200 from RandomShaper/gd_vm_msvc
Optimize GDScript VM codegen for MSVC
2023-09-25 17:18:19 +02:00
Rémi Verschelde d759f91f8d
Merge pull request #81101 from 398utubzyt/dotnet/abstract-class-support
C#: Add abstract class support
2023-09-25 17:18:05 +02:00
Rémi Verschelde 1a0e653d7f
Merge pull request #78573 from dalexeev/editor-create-script-class-name
Editor: Remove unused Class Name field from Create Script dialog
2023-09-25 17:17:46 +02:00
Pedro J. Estébanez 9c15e2f24b Optimize GDScript VM codegen for MSVC 2023-09-25 16:32:36 +02:00
Danil Alexeev 16b024ba82
GDScript: Fix crash with GDScriptNativeClass 2023-09-25 17:09:20 +03:00
A Thousand Ships e45927b2f2 Replace radians range hint with radians_as_degrees 2023-09-25 08:50:19 +02:00
Danil Alexeev 16e860bcb3
GDScript: Fix duplication of inherited script properties 2023-09-23 15:30:23 +03:00
Danil Alexeev 4ce27301d3
GDScript: Add INFERRED_DECLARATION warning 2023-09-22 23:13:52 +03:00
Danil Alexeev 10b00bc2ea
GDScript: Prevent constructing and inheriting engine singletons 2023-09-22 17:30:00 +03:00
0x4448 7ea4247c3d Omit quotes from completion if triggered with quote
Typing a single or double quote in an external editor triggers
auto-completion. The returned CompletionItem should not include
quotes since they're already in the editor.

CompletionParams was missing context in to_json() and this is
required to detect whether a quote was typed.
2023-09-21 17:37:32 -07:00
Danil Alexeev 426ccba70e
GDScript DocGen: Fix and improve appearance of metatypes and values 2023-09-21 20:44:34 +03:00
Danil Alexeev e8696f9961
GDScript: Improve call analysis
* Add missing `UNSAFE_CALL_ARGUMENT` warning.
* Fix `Object` constructor.
* Display an error for non-existent static methods.
2023-09-21 13:36:39 +03:00
Danil Alexeev 3c35e7f1d6
GDScript: Make array literal typed if for loop variable type is specified 2023-09-21 11:25:59 +03:00
Rémi Verschelde 888d3252ba
Merge pull request #81881 from lotuspar/patch-1
Rewrite a small comment in GDScript tokenizer code
2023-09-20 13:09:44 +02:00
Rémi Verschelde 281439ce20
Merge pull request #81699 from dalexeev/gds-fix-and-improve-doc-comment-parsing
GDScript: Fix and improve doc comment parsing
2023-09-20 13:09:32 +02:00
Rémi Verschelde 712ebe7d8a
Merge pull request #81332 from dalexeev/gds-fix-update-array-literal-in-weak-context
GDScript: Don't make array literal typed in weak type context
2023-09-20 13:09:23 +02:00
Rémi Verschelde 971f678442
Merge pull request #79510 from dalexeev/gds-fix-const-non-metatype-subscript
GDScript: Fix subscript resolution for constant non-metatypes
2023-09-20 13:09:17 +02:00
Rémi Verschelde 21b132616b
Merge pull request #74995 from dalexeev/gds-r-strings
GDScript: Add raw string literals (r-strings)
2023-09-20 13:09:13 +02:00
Danil Alexeev c35cb51d74
GDScript: Fix subscript resolution for constant non-metatypes 2023-09-19 22:26:06 +03:00
Gio b6f1dbb340 Rewrite a bit of comment in tokenizer code
gdscript_tokenizer.cpp: `change` -> `changes`
2023-09-19 21:38:52 +08:00
Rémi Verschelde e207595de9
Merge pull request #81844 from ryanabx/features/specify-lsp-port
Add `--lsp-port` as a command line argument
2023-09-19 09:04:30 +02:00
ryanabx a5b7c4c415 Add --lsp-port as a command line argument 2023-09-18 08:51:15 -05:00
ocean (they/them) 729c9b4d4b GDScript: Add check for super() methods not being implemented 2023-09-17 16:21:28 -04:00
Rémi Verschelde c63e0aefcf
Merge pull request #79366 from dalexeev/gds-signal-info-and-callback
Editor: Improve signal callback generation
2023-09-17 14:45:47 +02:00
Rémi Verschelde 6c1be30836
Merge pull request #81605 from dalexeev/gds-fix-some-lambda-bugs
GDScript: Fix some lambda bugs
2023-09-16 21:23:42 +02:00
Rémi Verschelde e5ac7cf034
Merge pull request #81577 from anvilfolk/thecycleeeeeeeeeeeeesaaaaaaaaaaaaah
GDScript: Fix compilation of expressions compiling other classes
2023-09-16 21:23:18 +02:00
Danil Alexeev 072e9c5c82
GDScript: Fix and improve doc comment parsing 2023-09-16 17:31:50 +03:00