summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2021-06-09Fix equal operation for typed enumsВладислав Прусаков
2021-06-03Rename Variant TRANSFORM to TRANSFORM3DAaron Franke
Also _transform to _transform3d
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-06-01Merge pull request #49067 from JFonS/fix_gcc_warningsRémi Verschelde
Fix some warnings raised by GCC-11.1
2021-05-31Rename the bundled text editor themes for consistency with themesHugo Locurcio
The Adaptive text editor theme is the default, and has therefore been renamed Default for consistency with the Default theme preset. It keeps its automatic dark/light switch status. The Default text editor theme was actually a legacy Godot 2-style theme, so it has been renamed to Godot 2 to match the theme preset. Its background color has been changed to be a constant opaque color, since the new editor theme made the theme look less good on a translucent background. The previous background color on light theme also lacked contrast.
2021-05-26Merge pull request #49114 from vnen/gdscript-fix-self-function-type-checkRémi Verschelde
GDScript: Fix function signature check for self calls
2021-05-26Merge pull request #49112 from vnen/gdscript-assign-type-checkRémi Verschelde
GDScript: Use analyzer data to decide assignment conversion
2021-05-26GDScript: Fix function signature check for self callsGeorge Marques
2021-05-26GDScript: Use analyzer data to decide assignment conversionGeorge Marques
Since there might be tricky cases in the analyzer (in the case of unsafe lines) which would need to be properly checked again. Instead, this splits the code generator in two functions and use information set by the analyzer to tell which function to use, without a need to re-check.
2021-05-25Fix some warnings raised by GCC-11.1jfons
2021-05-25Rename File::get_len() get_length()Marcel Admiraal
2021-05-24Merge pull request #49037 from vnen/fix-callable-freed-crashRémi Verschelde
2021-05-24Make Callable not crash on call when the object has been freedGeorge Marques
Also add a GDScript test for this case.
2021-05-24GDScript: Fix error handler for testsGeorge Marques
This changes the error message to be more clear on the output files and also fixes an issue with the relative path of the offending file that was not trimmed correctly.
2021-05-20Change behavior of String.rightTomasz Chabora
2021-05-20Fix typos with codespellRémi Verschelde
Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2021-05-19Merge pull request #48657 from Calinou/test-add-gdscriptRémi Verschelde
Add a unit test suite for GDScript
2021-05-19Show colored rects for autocompletion of Color constants in functionsYuri Roubinsky
2021-05-17Merge pull request #48347 from Blackiris/fix-temporary-key-not-releasedGeorge Marques
GDScript: Fix temporary value not released when used as a dictionary key
2021-05-17Merge pull request #48793 from vnen/gdscript-fix-temp-type-adjustRémi Verschelde
GDScript: Fix crash caused by uninitialized temp stack slots
2021-05-17GDScript: Fix crash caused by uninitialized temp stack slotsGeorge Marques
This adds initialization to every typed temporary stack slot at the beginning of the function call instead of emitting instructions, since those might be in a conditional branch and not be called.
2021-05-17Make all file access 64-bit (uint64_t)Pedro J. Estébanez
This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-16Merge pull request #48767 from vnen/gdscript-builtin-static-methodsRémi Verschelde
GDScript: Add support for builtin static method calls
2021-05-16GDScript: Add support for builtin static method callsGeorge Marques
2021-05-12Add a unit test suite for GDScriptHugo Locurcio
This tests run-time script loading.
2021-05-07Merge pull request #33577 from Calinou/highlight-control-flow-keywordsRémi Verschelde
Highlight control flow keywords with a different color
2021-05-06Fix temporary value not released when used as a dictionary keyJulien Nguyen
2021-05-06Merge pull request #47776 from Razoric480/foreportRémi Verschelde
Implement LSP didDeleteFiles & make parser aware of sub-nodes
2021-05-06Merge pull request #46714 from HaSa1002/fix-gdscript-underscore-strictRémi Verschelde
Fix GDScript Tokenizer being very strict about the number of underscores
2021-05-06Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio
2021-05-05Highlight control flow keywords with a different colorHugo Locurcio
This makes them easier to distinguish from other keywords.
2021-05-04Merge pull request #47798 from ray90514/bug#47620Rémi Verschelde
Fix constants at function scope are not defined as constants for completion
2021-05-03Merge pull request #47958 from Xrayez/gdscript-rename-test-scriptsRémi Verschelde
Rename GDScript test script filenames to use `snake_case`
2021-04-29Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-28GDScript: Fix crash when base of an attribute is invalidGeorge Marques
In attribute expressions (`a.b`) it's possible that the base has an incorrect syntax and thus become a nullptr expression in the tree. This commit add the check for this case to fail gracefully instead of crashing.
2021-04-28GDScript: Implement lambdas compilation and runtimeGeorge Marques
2021-04-28GDScript: Add lambdas to the type analyzerGeorge Marques
- Lambdas are always callables (no specific signature match). - Captures from the current context are evaluated.
2021-04-28GDScript: Add lambda syntax parsingGeorge Marques
Lambda syntax is the same as a the function syntax (using the same `func` keyword) except that the name is optional and it can be embedded anywhere an expression is expected. E.g.: func _ready(): var my_lambda = func(x): print(x) my_lambda.call("hello")
2021-04-27Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde
We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
2021-04-26Remove uses of `auto` for better readability and online code reviewsHugo Locurcio
The current code style guidelines forbid the use of `auto`. Some uses of `auto` are still present, such as in UWP code (which can't be currently tested) and macros (where removing `auto` isn't easy).
2021-04-24Merge pull request #48139 from vnen/gdscript-dict-keysRémi Verschelde
Fix mismatch between String and StringName in dictionary keys
2021-04-24Merge pull request #47891 from Razoric480/lsp-update-filesystemRémi Verschelde
Make LSP update the filesystem for changed scripts
2021-04-23GDScript: Make sure Lua-style dicts use StringName as keysGeorge Marques
2021-04-23GDScript: Fix resolution of dictionary keysGeorge Marques
There was a mixup between String and StringName keys. Now they're clearly separated. This also means you have to consider which type you're using for the dictionary keys and how you are accessing them.
2021-04-20Merge pull request #47956 from vnen/gdscript-double-stackRémi Verschelde
GDScript: Use special stack space for temporaries to reduce type changes
2021-04-16Rename GDScript test script filenames to use `snake_case`Andrii Doroshenko (Xrayez)
2021-04-16GDScript: Adjust type of temporaries when neededGeorge Marques
2021-04-16Merge pull request #47701 from vnen/gdscript-test-runnerRémi Verschelde
2021-04-14GDScript: Pool temporary values by type on the stackGeorge Marques
So the stack slots perform less type changes, which is useful for future optimizations.
2021-04-14Make LSP update the filesystem of changed scriptsFrancois Belair
This updates global classes and exposes base member variables. Fixes #39713