George Marques
01d13ab2c1
GDScript: Allow using self in lambdas
2022-04-24 21:49:02 -03:00
Rémi Verschelde
5ba3b993d5
Merge pull request #59694 from vnen/gdscript-better-call-super
2022-03-30 17:58:11 +02:00
George Marques
be718285f7
GDScript: Fix issues with completion and `super` calls
...
- Make call errors use the call node instead of the calle, which will be
empty on super calls.
- Don't allow `super()` to be used within lambdas.
2022-03-30 11:58:29 -03:00
Yuri Roubinsky
0584387918
Fix autocompletion of static methods in built-in types in GDScript
2022-03-30 17:40:41 +03:00
Yuri Rubinsky
7befa7234d
Merge pull request #58971 from Chaosus/gds_multiline_annotation
2022-03-22 08:25:37 +03:00
Yuri Roubinsky
8a6ab899ec
Add an error emitting when the `@export_flags` arg count is exceeded
2022-03-16 17:12:15 +03:00
Yuri Roubinsky
85488f12f3
Allow making multiline annotations in GDScript
2022-03-10 10:56:14 +03:00
SaracenOne
ae0026bc7b
Make 'is_attribute' false during parse error to prevent crash
2022-02-18 12:52:46 +00:00
Rémi Verschelde
317cd0b19a
Refactor some object type checking code with `cast_to`
...
Less stringly typed logic, and less String allocations and comparisons.
2022-02-08 10:08:34 +01:00
Rémi Verschelde
89eb6d372d
Merge pull request #57591 from vnen/gdscript-enum-fixes
2022-02-04 13:49:15 +01:00
George Marques
ad6e2e82a9
GDScript: Consolidate behavior for assigning enum types
...
This makes sure that assigning values to enum-typed variables are
consistent. Same enum is always valid, different enum is always
invalid (without casting) and assigning `int` creates a warning
if there is no casting.
There are new test cases to ensure this behavior doesn't break in
the future.
2022-02-03 13:32:16 -03:00
Rémi Verschelde
b5f524d4c0
Merge pull request #55433 from V-Sekai/prev_operand_nullptr_check
...
Check for nullptr expression in parse_precedence function
2022-01-22 20:31:45 +01:00
Rémi Verschelde
182a36db47
Merge pull request #55214 from Scony/fix-gdscript-crash-2
...
Fix GDScript parser crash on 'dollar mixed with assignment' expression
2022-01-22 20:30:54 +01:00
Rémi Verschelde
91909ef801
Merge pull request #55625 from cdemirer/fix-type-guessing-and-gdscript-parser-printing
...
Fix `--test gdscript-parser` crash
2022-01-17 20:17:02 +01:00
luz paz
858bcd5058
Fix various typos
...
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13 23:20:01 -05:00
Rémi Verschelde
49482966ec
Merge pull request #55715 from nathanfranke/enum-ordered
2022-01-10 17:19:52 +01:00
Rémi Verschelde
8f8c3f4b4c
Merge pull request #56342 from NNesh/fix/class-completion
2022-01-10 17:07:08 +01:00
NNesh
1a1ee43e3e
Fixed completion showing for class members
2022-01-08 01:49:18 +05:00
Rémi Verschelde
6d4ed65f4c
Merge pull request #56483 from vnen/gdscript-warning-annotation
...
Add annotation to ignore warnings
2022-01-05 09:05:56 +01:00
George Marques
fd643c903d
GDScript: Add annotation to ignore warnings
2022-01-04 09:32:43 -03:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
...
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
cdemirer
3033e0f8a2
Fix gdscript-parser crash
...
Fixes gdscript-parser crashing while printing empty identifiers.
2022-01-03 08:47:18 +08:00
Nathan Franke
b5b75cad43
Use OrderedHashMap for enum_values
2021-12-16 21:49:42 -08:00
Yuri Roubinsky
566895732c
Fix shadowed global identifier warning duplication
2021-12-13 11:54:23 +03:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
...
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Raul Santos
c3fb5ff359
Fix typo in `gdscript_parser`
2021-12-03 21:47:27 +01:00
SaracenOne
3eec759e87
Check for nullptr expression in parse_precedence function
2021-11-29 11:29:15 +00:00
Lightning_A
e078f970db
Rename `remove()` to `remove_at()` when removing by index
2021-11-23 18:58:57 -07:00
Pawel Lampe
1a15a3adf6
Fix GDScript parser crash on 'dollar mixed with assignment' expression
...
fixes #53696
2021-11-21 21:18:46 +01:00
Yuri Roubinsky
3396b25489
Allow using built-in names for variables, push warnings instead
2021-11-13 21:47:24 +03:00
Rémi Verschelde
e8870ddefc
Merge pull request #54676 from Chaosus/gds_restrict_names
2021-11-10 15:20:44 +01:00
Maximilian
c7a8e047cc
Allow using $/root node paths
...
format
fix shadowing
use match instead of comparison
Update gdscript_parser.cpp
2021-11-09 18:46:28 +01:00
Yuri Roubinsky
95f6f3c756
Prevent identifiers from naming as built-in funcs and global classes
2021-11-08 21:35:31 +03:00
Rémi Verschelde
f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands
2021-10-28 17:10:52 +02:00
Rémi Verschelde
6b090e325a
Merge pull request #53526 from KoBeWi/super_print
2021-10-28 15:47:52 +02:00
Rémi Verschelde
3a6be64c12
clang-format: Various fixes to comments alignment from `clang-format` 13
...
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
George Marques
b0725a3b7d
GDScript: Avoid crash if missing setter signature
2021-10-15 15:53:24 -03:00
George Marques
f930d54140
Merge pull request #53103 from ZuBsPaCe/gdscript-analyze-properties-fix
...
GDScript: Report property type errors
2021-10-11 11:01:39 -03:00
Yuri Sizov
41e271af6e
Remove redundant String operation from GDScript enum exports
2021-10-11 02:11:32 +03:00
ZuBsPaCe
551ceb590b
GDScript: Report property type errors
...
Inline getters & setters are now FunctionNodes.
Their names are set in the parser, not in the compiler.
GDScript-Analyzer will now run through getter and setter.
Also report wrong type or signature errors regarding getset properties.
Added GDScript tests for getters and setters.
#53102
2021-10-08 22:06:15 +02:00
Fabio Alessandrelli
54ec66a700
[Net] Rename RPCConfig.sync to call_local.
...
For consistency with the other user facing changes.
2021-10-08 12:39:09 +02:00
kobewi
31012fd060
Change print_line() to use any number of Variants
2021-10-07 16:28:22 +02:00
Max Hilbrunner
44b68f08b4
Fix outdated no_call_local, use call_remote
2021-10-06 23:51:57 +02:00
Brian Semrau
dc046e5cbe
GDScript Check for null list in `for` loop
2021-10-02 13:53:56 -04:00
Fabio Alessandrelli
24a949ea11
[Net] Rename RPC constants and annotation arguments.
...
any -> any_peer
sync -> call_local
ordered -> unreliable_ordered
Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER
Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
2021-10-01 18:14:38 +02:00
Lightning_A
c63b18507d
Use range iterators for `Map`
2021-09-30 15:09:12 -06:00
Rémi Verschelde
679f70c1e1
Merge pull request #52906 from vnen/gdscript-show-error-on-yield
2021-09-21 20:36:39 +02:00
Rémi Verschelde
b3b4860d2e
Merge pull request #52905 from vnen/gdscript-single-line-declaration
2021-09-21 20:35:36 +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
George Marques
e5ebc9710d
GDScript: Allow classes declaration to be done in single line
...
Incidentally, allow multiple statements in single line functions when
using semicolon as a terminator.
2021-09-21 14:14:46 -03:00