Commit graph

2459 commits

Author SHA1 Message Date
Haoyu Qiu 5a283bdbcd Allow unicode identifier in GDScript syntax highlighter 2023-01-29 13:17:05 +08:00
Rémi Verschelde a3dae9e548
Merge pull request #72285 from vnen/gdscript-variable-match
GDScript: Allow variables in match patterns
2023-01-29 02:45:48 +01:00
Rémi Verschelde 9420116f6c
Merge pull request #72286 from vnen/gdscript-native-static-call-crash
GDScript: Avoid calling non-static methods on native classes
2023-01-29 02:23:55 +01:00
Rémi Verschelde 4011a0915e
Merge pull request #71844 from vonagam/fix-constant-conversions
GDScript: Fix constant conversions
2023-01-29 02:18:57 +01:00
George Marques aee7b7363b
GDScript: Avoid calling non-static methods on native classes 2023-01-28 20:33:01 -03:00
George Marques c68b2358d5
GDScript: Allow variables in match patterns
To restore an ability available in 3.x and reduce compatibility changes.
2023-01-28 19:53:27 -03:00
Dmitrii Maganov 31e0ae2012 GDScript: Fix constant conversions 2023-01-29 00:01:53 +02:00
Dmitrii Maganov 6194a7e0fa GDScript: Fix implicit conversions for function returns 2023-01-28 23:56:07 +02:00
Rémi Verschelde 218bef90af
GDScript: Fix test from #69163 after annotations change 2023-01-28 17:01:19 +01:00
Rémi Verschelde cc6e8379d4
Merge pull request #69163 from vonagam/variant-safe-lines
GDScript: Fix wrong marking of some lines related to Variant as unsafe
2023-01-28 15:40:19 +01:00
Dmitrii Maganov abe6d67232 GDScript: Fix test for read-only state of constants 2023-01-27 05:28:08 +02:00
Rémi Verschelde a5c211641f
Merge pull request #71634 from dalexeev/gds-annotations-analyzer
GDScript: Allow constant expressions in annotations
2023-01-26 01:07:00 +01:00
Rémi Verschelde 944b44243d
Merge pull request #72008 from vonagam/fix-property-access-unsafe-mark
GDScript: Fix marking of line with unsafe property access as unsafe
2023-01-26 01:04:57 +01:00
Danil Alexeev b004f8180e
GDScript: Allow constant expressions in annotations 2023-01-25 18:43:56 +03:00
George Marques e93266b9ff
Merge pull request #71120 from jordigcs/ternary
Closes https://github.com/godotengine/godot/issues/71065
2023-01-25 12:23:11 -03:00
Rémi Verschelde 41e5f5b093
Merge pull request #71349 from vonagam/disallow-infer-on-weak
GDScript: Disallow type inference with untyped initializer
2023-01-25 14:42:20 +01:00
Dmitrii Maganov 3c308f42e2 GDScript: Fix marking of line with unsafe property access as unsafe 2023-01-25 01:45:40 +02:00
Danil Alexeev 13215638a9
Clarify error message about script-level annotation 2023-01-24 13:10:45 +03:00
George Marques ba9491f870
Merge pull request #70948 from vnen/gdscript-ptr-method-name-in-debug 2023-01-23 12:24:15 -03:00
Rémi Verschelde 81fe3715b8
Merge pull request #71914 from vnen/gdscript-no-continue-match
GDScript: Remove function of `continue` for match statement
2023-01-23 15:35:55 +01:00
George Marques 80e06b29e7
GDScript: Add names for disassembling function pointers
When instructions use function pointers, it's not possible to retrieve
their original names in the disassembly. This stores the names in
vectors (in debug builds) so they can be shown.
2023-01-23 11:04:31 -03:00
Rémi Verschelde 5726bf578d
Merge pull request #71676 from vnen/gdscript-unicode-identifiers
Add support for Unicode identifiers in GDScript and Expression
2023-01-23 10:24:33 +01:00
George Marques 9462ae4783
GDScript: Remove function of continue for match statement
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-22 18:45:24 -03:00
George Marques 7548e043fc
Add support for Unicode identifiers in GDScript
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-21 13:39:40 -03:00
Rémi Verschelde ebd0b40f6e
Merge pull request #71687 from reduz/support-script-class-name-in-efs
Support script global resource name in EditorFileSystem
2023-01-21 16:54:23 +01:00
Juan Linietsky dddd8d43f6 Support script global resource name in EditorFileSystem
* Works for binary and text files.
* Makes EditorQuickOpen work with custom resources again.
* Information is cached and easily accessible.

Properly fixes #66179. Supersedes #66215 and supersedes #62417

**WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
2023-01-21 14:19:27 +01:00
Adam Wardell e9d8c261a5 call update_exports from LSP didSave function
exports in the inspector were not properly appearing when a gdscript was saved using an external IDE
this commit adds a call to GDScript::UpdateExports toward the end of GDScriptTextDocument::didSave
2023-01-20 19:16:53 -08:00
George Marques 7e5c2f945d
Remove references to compiled GDScript in export
This feature was removed from GDScript so it should not be present on
the interface nor in the saved export presets.
2023-01-20 15:09:07 -03:00
jordi 2e488072d0 Allow standalone ternary expressions 2023-01-19 14:27:57 -06:00
Adam Scott 807b7ed557 Update @icon definition to add a note 2023-01-18 19:48:01 -05:00
ocean (they/them) 4854e723be Fix unnammed enum crash regression 2023-01-18 09:35:48 -05:00
Rémi Verschelde 4005fc4b8d
Merge pull request #71279 from vonagam/fix-iterator-number-type
GDScript: Fix typing of iterator in for loop
2023-01-16 22:21:26 +01:00
Rémi Verschelde 1c3653e083
Merge pull request #67774 from aaronfranke/script-annotations
Make script annotations be placed before `class_name` and `extends`
2023-01-16 22:20:44 +01:00
Rémi Verschelde 585a934454
Merge pull request #71434 from adamscott/fix-reduce-identifier-from-base-class-script-retrieval
Fix cyclic reference errors while reducing identifiers
2023-01-16 22:15:21 +01:00
George Marques 629796c333
Merge pull request #69970 from poohcom1/fix/autocomplete-custom-class
Fixes https://github.com/godotengine/godot/issues/69941
2023-01-16 09:44:23 -03:00
Adam Scott 48e041458f Fix cyclic reference errors while reducing identifiers.
Co-authored-by: Dmitrii Maganov <vonagam@gmail.com>
2023-01-15 19:19:25 -05:00
poohcom1 aa4bceff3e Add identifier completion for custom classes.
Previously, custom class would only auto-complete for types in GDScript.
This applies it to identifiers as well.
2023-01-16 00:25:24 +07:00
Yuri Sizov 4c1f11944e Update all outdated online documentation links 2023-01-14 19:38:00 +03:00
Yuri Rubinsky 9bd5ef1836 Fix GDScript script templates to use a PascalCase style for _CLASS_ 2023-01-14 16:21:05 +03:00
Dmitrii Maganov a1e0281b45 GDScript: Disallow type inference with untyped initializer 2023-01-13 20:51:29 +02:00
Rémi Verschelde ef01b49227
Merge pull request #71329 from vnen/gdscript-fix-enum-value-resolution
GDScript: Fix infinite recursion in resolution of enum values
2023-01-13 18:02:58 +01:00
Rémi Verschelde 4c2dea108e
Merge pull request #70540 from vaartis/multiline-arrays-dictionaries
Implement export_multiline support for Array[String] and Dictionary
2023-01-13 18:01:55 +01:00
Dmitrii Maganov 40613ebd21 GDScript: Fix typing of iterator in for loop 2023-01-13 15:36:11 +02:00
George Marques 3a5e41293c
GDScript: Fix infinite recursion in resolution of enum values 2023-01-13 10:17:30 -03:00
Rémi Verschelde aaa5158ff9
Merge pull request #70733 from vonagam/fix-assigning-untyped
GDScript: Fix some issues with assignments that involve untyped things
2023-01-12 20:08:55 +01:00
Rémi Verschelde 40b9c246b6
Merge pull request #71197 from adamscott/add-default-virtual-path-gdscript
Add default virtual `gdscript://` path to `GDScript` instances
2023-01-12 17:56:09 +01:00
Rémi Verschelde def592114f
Merge pull request #70700 from vonagam/fix-abstract-extends
GDScript: Fix extending abstract classes, forbid their construction
2023-01-12 17:19:51 +01:00
Dmitrii Maganov 274d49790d GDScript: Fix extending abstract classes, forbid their construction 2023-01-12 17:47:10 +02:00
Adam Scott e3e55b29ce Add default virtual gdscript:// path to GDScript instances 2023-01-12 10:27:38 -05:00
Dmitrii Maganov ef81b344be GDScript: Fix wrong marking of some lines related to Variant as unsafe 2023-01-12 17:21:33 +02:00