| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
dalexeev/gds-fix-non-static-access-in-static-context
GDScript: Fix access non-static members in static context
|
| | |
|
|\ \
| | |
| | |
| | | |
GDScript: Call implicit ready on base script first
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is generally expected that the base class is called before the
inherited clas. This commit implements this behavior for the implicit
ready function (`@onready` annotation) to make it consistent with the
expectations.
|
| |/
|/| |
|
|\ \
| | |
| | |
| | | |
GDScript: Perform validated calls with static methods
|
| | |
| | |
| | |
| | |
| | |
| | | |
When the types are validated at compile time, this type of call runs
faster. It is already used for instance methods, this adds this
optimization to native static methods as well.
|
|\ \ \
| |_|/
|/| |
| | | |
[Core] Fix property access on read-only `Dictionary`
|
| | | |
|
| |/
|/| |
|
| | |
|
|\ \
| | |
| | |
| | | |
GDScript: Fix uninitialized local variables not being reset
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | | |
Completion Tests: Add script to owner
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
vnen/gdscript-no-unused-constant-warning-with-underscore
GDScript: Suppress unused constant warning with underscore
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The warning message mentions that local constants prefixed with `_` does
not generate the warning. This commit actually implements this warning
suppression.
|
|/ / /
| | |
| | |
| | |
| | | |
The default will always be set to `0`, so if it's not a valid value in
the enum, the warning is shown.
|
|\ \ \
| | | |
| | | |
| | | | |
GDScript: Fix continuation lines in `GDScriptTokenizerBuffer`
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
An enum value is always an integer so the cast is valid. The code here
now consider this case to avoid giving an error message.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
GDScript: Infer type with string format operator
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If the left value type is known to be String, assume the format operator
(`%`) will return a string, since it works with any type in the right
hand side. This is also used by type inference even if the right hand
type is unknown at compile time.
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | | |
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.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Fix enum autocompletion for core classes
|
| | | | |
| | | | |
| | | | |
| | | | | |
Minor fix consisted in the use of [[fallthrough]] macro
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | | |
GDScript: Fix `UNSAFE_CAST` warning
|
| | | | | |
|
| |_|_|/
|/| | | |
|
| |_|/
|/| |
| | |
| | |
| | | |
This prevents infinite recursion with one-shot connections emitting
themselves
|
|\ \ \
| | | |
| | | |
| | | | |
Add methods to get argument count of methods
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added to:
* `Callable`s
* `Object`s
* `ClassDB`
* `Script(Instance)`s
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | | |
Allow `@export`ed Arrays to set property hints for their elements
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Add tests for `get_node` autocompletion
|
| | | | | |
|
| | | | | |
|
| |/ / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
native type, and to not trigger on self-calls
Not defaulting to the native type rationale:
Defaulting to the native type is less than useful, as:
* There are very few native types that are extensible and have static methods.
* Defaulting to the native type does not account for a method being script-defined.
While the "real fix" would be to carefully track the source of the method, the get_function_signature method is already complicated enough.
This will at least ensure the resulting code should always be valid.
Not triggering on self-calls rationale:
Found in PR comment https://github.com/godotengine/godot/pull/85918#issuecomment-1935864459
```
static func example():
pass
func example2():
example() # self-call on static function
```
Disabling this warning on self-calls is:
* Consistent with other languages
* Important for anonymous classes (where the output code is unusable)
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | | |
GDScript: Add `@export_storage` annotation
|
| |/ |
|
|\ \
| | |
| | |
| | | |
GDScript: Set `has_type` false if it is `BUILTIN` but `Variant::NIL`
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ / |
|