summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
AgeCommit message (Collapse)Author
2019-04-15GDScript: add variable shadowing warninglupoDharkael
2019-04-12Merge pull request #27863 from bojidar-bg/27460-constant-class-clashRémi Verschelde
Check subclasses too when checking for name clashes
2019-04-10GDScript: Don't allow built-in scripts to use class_nameGeorge Marques
2019-04-10Check for subclasses when checking for name clashesBojidar Marinov
Fixes #27460
2019-04-09Style: Apply new changes from clang-format 8.0Rémi Verschelde
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
2019-04-05Fix -Wimplicit-fallthrough warnings from GCC 8Rémi Verschelde
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional. Can be replaced by `[[fallthrough]]` if/when we switch to C++17. The warning is now enabled by default for GCC on `extra` warnings level (part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet, but we could enable it manually once we switch to C++11. There's no equivalent feature in MSVC for now. Fixes #26135.
2019-04-01Merge pull request #26097 from ↵Rémi Verschelde
danielspaniol/25955-wrong-unreachable-warning-after-returning-from-matchs-wildcard-pattern Fix: Wrong unreachable warning after returning from match's wildcard pattern #25955
2019-03-14Fix duplicated lines in GDScript bytecodeBojidar Marinov
Fixes #26789
2019-03-05Fix enums coming from other classes without preloadBojidar Marinov
Fix #19704, fix #26001
2019-03-04Revert "Forbid implicit type conversion in GDScript"Rémi Verschelde
2019-03-04Merge pull request #26562 from vnen/gdscript-no-implicit-castRémi Verschelde
Forbid implicit type conversion in GDScript
2019-03-03GDScript: Fix issue when detecting file class in inner classGeorge Marques
2019-03-03GDScript: Forbid implicit type conversionGeorge Marques
Since types are not present in release builds, this could cause issues where a variable does not have the exact defined type.
2019-03-03GDScript: Allow `for` iterator to be rededefinedGeorge Marques
2019-03-03Merge pull request #26547 from vnen/gdscript-dependency-parseJuan Linietsky
Add a parse mode for GDScript which doesn't load dependencies
2019-03-03Add a dependency search mode for GDScript parserGeorge Marques
- This mode avoids loading any other resource. - Search for class_name now uses this mode, to avoid loading in the scan thread. - Implement get_dependencies() for GDScript loader, now exporting dependencies only should include the preloaded resources.
2019-03-03Fix GDScript checking for assigning to a constant only in releaseBojidar Marinov
2019-02-26Fix GDScript exports having the wrong type of default value by converting itBojidar Marinov
Also, initialize elements of PoolArrays when resizing them in the editor. Fixes #26066.
2019-02-24Merge pull request #25018 from AllanDaemon/#24895George Marques
Fix support for optional parameters in setters
2019-02-21Request to use load when cyclic reference is found, closes #26119Juan Linietsky
2019-02-20Require `return` in all match branchesDaniel Spaniol
Before the parser only checked if the catch-all branch has a return in order to determine if the entire match block has a return. This code block was assumed to always return. match value: "test": print("test") _: return Now as soon as one of the branches has no return, the entire match block is marked to not have a return.
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-13Fix typos with codespellRémi Verschelde
Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-02-12Merge pull request #25481 from hpvb/fix-ubsan-asan-reportsRémi Verschelde
Fix many asan and ubsan reported issues
2019-02-12Merge pull request #25550 from DualMatrix/fix-25357Rémi Verschelde
Fixed Null appearing inside export variables with type hints and no default value
2019-02-09Merge pull request #25650 from willnationsdev/script-iconRémi Verschelde
Fix script class icons looking for paths at runtime
2019-02-06Fix script class icon filepath lookups at runtime.Will Nations
2019-02-01Fixed Null appearing inside export variables with type hints and no default ↵DualMatrix
value The default value of the type is now used to initialise it. export(int) A Will now have A be 0 istead of Null even though it still showed as 0 before in the inspector, fixes #25357
2019-01-30Fix many asan and ubsan reported issuesHein-Pieter van Braam
This allows most demos to run without any ubsan or asan errors. There are still some things in thirdpart/ and some things in AudioServer that needs a look but this fixes a lot of issues. This should help debug less obvious issues, hopefully. This fixes #25217 and fixes #25218
2019-01-23GDScript: do second pass of parsing on releaseGeorge Marques
Some construct (like match) actually depends on the second pass. This adds some extra checks to not perform specific type-checks on release since not all type information is available.
2019-01-23GDScript: fix default value for autoexported typed varsGeorge Marques
2019-01-23GDScript: read constants from parent scriptsGeorge Marques
This is needed to create export variables from enums defined in a parent class.
2019-01-23GDScript: allow local classes to be used as typesGeorge Marques
2019-01-23Fix #24895 (support for optional parameters in setters)Allan Daemon
2019-01-17Merge pull request #25069 from vnen/gdscript-fixesHein-Pieter van Braam
A bit more of GDScript fixes
2019-01-16GDScript: clarify error message about cyclesGeorge Marques
They may happen with any cyclic dependency, not only with inheritance.
2019-01-16GDScript: fix type-check of indexed valuesGeorge Marques
2019-01-16Merge pull request #25001 from jlahman/gdscript-export-var-fixRémi Verschelde
Fixes export PackedScene "reset to default" throwing errors
2019-01-15Fixes export PackedScene "reset to default" throwing errorsjlahman
When exporting variables from a gdscript, default values of uninitialized variables would never be set. This caused the default value to be Variant::NIL, and when a user tried to reset the variable through the editor, an error would be thrown because too few arguments would be counted(end of argument list for calls are detected by NIL values). Fixed by simply setting default value to an empty variant of the proper type in gdscript parser.
2019-01-15GDScript: consider constructors as always existingGeorge Marques
There's always a constructor, even if implicit, especially for native types. Also don't check for signature match on function call, since this information is not available in release builds.
2019-01-15GDScript: allow objects to be keys of dictionariesGeorge Marques
The engine allows this already, so the parser should not fail in this case.
2019-01-15GDScript: don't check types on release buildsGeorge Marques
A lot of information is missing on release, and the checks might take a performance hit. Also, having GDScript more lenient on release is usually desirable.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-07Fix type-compatibilty check in GDScriptGeorge Marques
Objects and PoolArrays are properly tested for conversion.
2018-11-23Merge pull request #23740 from ttencate/unused_argument_22139Rémi Verschelde
Prevent unused_argument warning when passing arg to parent constructor
2018-11-17Check for valid values when checking for class membersGeorge Marques
- Check if GDScript was compiled correctly before checking its functions and properties. - Check if native class name is actually set before looking for it in the ClassDB.
2018-11-16Prevent unused_argument warning when passing arg to parent constructorThomas ten Cate
This requires creating the FunctionNode object a bit sooner, and setting it as the current_function while parsing the parent constructor call arguments. Note that the return type has not yet been parsed at this point, but that doesn't seem to be a problem. Fixes #22139
2018-11-11Make enum values not be script constants if enum is namedGeorge Marques
Anonymous enums still creates script constants. Also add a check to see if name used for enum is already defined.
2018-11-06Add missing flag for exported enumKanabenki
2018-11-04Removed unnecessary assignmentsWilson E. Alvarez