Commit graph

25 commits

Author SHA1 Message Date
Juan Linietsky
1bbe0a2b2f Fix global script class parsing.
* Broke with #72226
* Restored previous version of the code, made it even more error tolerant.
* Added a warning to **not** change the code.

Fixes #72226.
2023-01-31 12:43:25 +01:00
Danil Alexeev
13215638a9
Clarify error message about script-level annotation 2023-01-24 13:10:45 +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
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
Adam Scott
44d1d72af1 Add GDScript .editorconfig rules
- Uniformize `.gd` unit test files indentation to tabs (where needed)
2023-01-10 12:25:35 -05:00
Aaron Franke
6590e1fd8a
Make script annotations placed before class_name and extends 2022-12-19 22:01:29 -06:00
Rémi Verschelde
f0eb3ac5d3
Merge pull request #62701 from cdemirer/for-variable-conflict 2022-07-06 16:02:49 +02:00
Yuri Sizov
f85bafaa11 Add grouping annotations for class properties in GDScript 2022-07-05 22:01:40 +03:00
cdemirer
dbdf0174b4 Do error when for variable conflicts with a variable in scope 2022-07-04 12:30:39 +03:00
George Marques
eba3e0a9fc
GDScript: Support % in shorthand for get_node
The `%` is used in scene unique nodes. Now `%` can also be used instead
of `$` for the shorthand, besides being allowed generally anywhere in
the path as the prefix for a node name.
2022-05-27 13:46:18 -03:00
George Marques
0a28b4cd94
GDScript: Do not allow standalone lambdas
They cannot be accessed in this case, so an error is shown to avoid
misleading the uses, especially in case of named lambdas.
2022-05-23 12:25:03 -03:00
cdemirer
3c5b9d1be3 Fix issues with multiple bind patterns in match statement 2022-04-04 15:47:08 +08:00
Pawel Lampe
1a15a3adf6 Fix GDScript parser crash on 'dollar mixed with assignment' expression
fixes #53696
2021-11-21 21:18:46 +01:00
Max Hilbrunner
626ca50676 Improve GDScript indentation error message 2021-10-28 13:01:53 +02:00
George Marques
262d6c6bef
GDScript: Show specific error when "yield" is used
To help people porting code, it gives a hint to use "await" instead of a
generic error.
2021-09-21 14:38:14 -03:00
Rémi Verschelde
82c12060b2
Merge pull request #52718 from Calinou/gdscript-add-integration-tests-2 2021-09-21 14:13:24 +02:00
George Marques
651319de11
GDScript: Properly catch error when missing index in subscript 2021-09-17 14:31:51 -03:00
Hugo Locurcio
c6ca09dc6f
Add more integration tests to the GDScript test suite
This also fixes a typo in the `bitwise_float_right_operand.gd` test.
2021-09-15 19:57:39 +02:00
Rémi Verschelde
a4187c9235
Merge pull request #52706 from vnen/gdscript-ternary-operator-crash
GDScript: Show error when missing expression after ternary else
2021-09-15 17:20:52 +02:00
George Marques
107af38fd1
GDScript: Show error when missing expression after ternary else 2021-09-15 11:43:36 -03:00
George Marques
d49046938a
GDScript: Show error on unary operators without argument 2021-09-15 11:08:59 -03:00
Hugo Locurcio
c0083c0f90
Add dozens of new integration tests to the GDScript test suite
This also ignores `.out` files in the file format static checks.
2021-09-14 18:42:08 +02:00
kobewi
c7452a9940 Fix crash with consecutive commas in Dictionary 2021-09-10 15:38:24 +02:00
Louis Dumont
79578a5625 Fixed crash when parsing an empty assignment.
Resolves #51620.
2021-08-25 18:48:08 +02:00
Andrii Doroshenko (Xrayez)
1e26bf23c2 Rename GDScript test script filenames to use snake_case 2021-04-16 22:16:19 +03:00