Commit Graph

683 Commits

Author SHA1 Message Date
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 +01:00
e9ce3932b3 Merge pull request #98099 from dalexeev/pot-gen-add-comment-support
POT Generator: Add support for `TRANSLATORS:` and `NO_TRANSLATE` comments
2024-11-15 10:42:45 -06:00
b5368d5e40 Merge pull request #98356 from dustdfg/gdscript_endif_readability_comments
Add some comments to `#endif's` where it helps readability
2024-10-24 19:11:42 -07:00
8c29ef38fc Add some comments to #endif's where it will easier life
Also added some new line to improve readability

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
2024-10-21 14:31:45 +03:00
140c6a612e GDScript: Fix annotation parsing adding new annotation entries 2024-10-13 22:43:06 +02:00
cab80cb97d POT Generator: Add support for TRANSLATORS: and NO_TRANSLATE comments 2024-10-13 11:40:11 +03:00
0b2446101c Merge pull request #96693 from HolonProduction/annotation-arg-hint
Autocompletion: Add arghint for annotations
2024-10-02 15:00:58 +02:00
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 +01:00
00dfd568e0 Autocompletion: Add arghint for annotations 2024-09-07 20:47:34 +02:00
0b4ae20156 Merge pull request #78656 from Repiteo/typed-dictionary
Implement typed dictionaries
2024-09-06 22:38:13 +02:00
721d280b8a Merge pull request #96326 from HolonProduction/completion-hacks-and-fixes
Autocompletion: Reintroduce enum options on assignment
2024-09-04 18:55:27 +02:00
9853a69144 Implement typed dictionaries 2024-09-04 10:27:26 -05:00
194bdde947 Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
2024-08-31 15:01:09 +02:00
171c522290 Autocompletion: reintroduce enum options on assignment 2024-08-30 13:46:48 +02:00
930742f8b3 Fix missing GDScriptParser reference on completion context 2024-08-28 17:03:12 -03:00
6eb1d3cf98 Merge pull request #94888 from rune-scape/no-const-cast-gdscript-parser
GDScriptParser: Avoid `const_cast` of `AnnotationNode`
2024-08-28 00:12:35 +02:00
c824403853 Autocompletion: enable string literal completion in subscripts 2024-08-27 13:02:09 +02:00
58505b0bce Merge pull request #94082 from HolonProduction/completion-force
Autocompletion: Rework argument options string literal completion
2024-08-20 10:01:52 +02:00
22f43b7879 Avoid const_cast in GDScriptParser 2024-07-28 08:04:25 -07:00
4699e69708 Autocompletion: register depended parsers with the main parser 2024-07-18 12:16:28 +02:00
110c4d4067 GDScript: Fix "Mismatched external parser" for autoloads 2024-07-09 16:16:45 +03:00
0abd0ae364 Autocompletion: rework argument options string literal completion 2024-07-08 17:53:36 +02:00
39369db029 Fix synchronization of global class name 2024-06-25 18:33:07 -04:00
6882a948b6 Merge pull request #92874 from Chaosus/completion_color_color
Add coloring for completion of Color components
2024-06-24 11:14:02 +02:00
24b6edcd38 GDScript: Fix non-global class export 2024-06-20 14:30:12 +03:00
09a037628e Merge pull request #85488 from miv391/fix-expected-indented-block-error-message-lines
Moving "Expected indented block" error message's line number back to where the error is
2024-06-10 16:11:30 +02:00
305b948256 Add coloring for completion of Color components 2024-06-07 18:35:56 +03:00
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 +01:00
6761923f4f Merge pull request #90716 from dalexeev/gds-fix-export-annotation-issues
GDScript: Fix some export annotation issues
2024-05-19 11:21:00 +02:00
7dd801c580 GDScript: Fix STANDALONE_EXPRESSION warning for preload() 2024-05-17 10:33:01 +03:00
76b2d85c9f GDScript: Fix some export annotation issues 2024-05-13 17:49:06 +03:00
ff018079a1 Merge pull request #84706 from HolonProduction/completion-get-child
Fix autocompletion after DOLLAR token
2024-05-07 16:49:13 +02:00
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 +02:00
6b88c86cec GDScript: invalidate GDScriptParserRef when reloading 2024-04-18 14:05:58 -07:00
74177d79c9 Fix multiline array/dictionary match statements
Currently array and dictionary expressions cannot be spread over
multiple lines in match statements.

Adding mutliline push/pop while parsing the pattern for bracket and
brace enables the ability for these to be multiline. This enables more
complex patterns to be matched without exceeding line limits.

Fixes #90372
2024-04-12 10:59:28 +02:00
877802e252 GDScript: Don't warn on unassigned for builtin-typed variables
If the type of a variable is a built-in Variant type, then it will
automatically be assigned a default value based on the type. This means
that the explicit initialization may be unnecessary. Thus this commit
removes the warning in such case.

This also changes the meaning of the unassigned warning to happen when
the variable is used before being assigned, not when it has zero
assignments.
2024-04-10 11:59:57 -03:00
453485aede Merge pull request #89270 from Repiteo/enforce-typename-in-templates
Enforce template syntax `typename` over `class`
2024-03-14 22:34:37 +01:00
ef1909fca3 GDScript: Fix @warning_ignore annotation issues 2024-03-12 19:00:06 +03:00
87718d2a6e Editor Help: Add syntax highlighting for code blocks 2024-03-09 00:02:31 +03:00
9903e6779b Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
8e520454ef GDScript: Add @export_custom annotation
Allows setting any arbitrary hint, hint string, and usage flags.
Useful for more complex hints or potential future hints not
available as a dedicated annotation.
2024-03-07 10:55:21 -03:00
882441a0ad Support Array and PackedArray in @export_* 2024-03-06 16:17:54 +09:00
1621e725fa Fix autocompletion after DOLLAR token 2024-03-02 18:56:02 +01:00
21ee3716c2 Merge pull request #82122 from dalexeev/gds-add-export-hidden-annotation
GDScript: Add `@export_storage` annotation
2024-02-27 21:22:49 +01:00
8ffc50ee8c GDScript: Canonicalize script path in FQCN 2024-02-26 10:46:24 +03:00
af28f87791 Documentation: Add support for deprecated/experimental messages 2024-02-15 15:59:50 +03:00
684752e75b Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
72e5f8c31e GDScript: Enable compression on export
Besides the regular option to export GDScript as binary tokens, this
also includes a compression option on top of it. The binary format
needs to encode some information which generally makes it bigger than
the source text. This option reduces that difference by using Zstandard
compression on the buffer.
2024-02-08 11:20:07 -03:00
b4d0a09f15 GDScript: Reintroduce binary tokenization on export
This adds back a function available in 3.x: exporting the GDScript
files in a binary form by converting the tokens recognized by the
tokenizer into a data format.

It is enabled by default on export but can be manually disabled. The
format helps with loading times since, the tokens are easily
reconstructed, and with hiding the source code, since recovering it
would require a specialized tool. Code comments are not stored in this
format.

The `--test` command can also include a `--use-binary-tokens` flag
which will run the GDScript tests with the binary format instead of the
regular source code by converting them in-memory before the test runs.
2024-02-08 11:20:05 -03:00
9a793d95eb Merge pull request #87124 from rsubtil/bugfix-warn_as_err
Simplify script paths to ensure proper resource path checks
2024-02-08 13:45:57 +01:00