summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
AgeCommit message (Collapse)Author
2020-03-11Fix various typosluz.paz
Found via `codespell`
2020-03-10Merge pull request #36704 from ThakeeNathees/gdscript-duplicate-args-fixRémi Verschelde
GDScript duplicate arguments bug fixed
2020-03-10Merge pull request #36767 from ThakeeNathees/class-pass-fixRémi Verschelde
fix: Classes can't have pass
2020-03-06logic error in gdscript_parser.cpp for-loop-rangeThakee Nathees
there was a logic error in for loop range argument that check if all of the argument were constants, fixed
2020-03-06duplicate arguments in a function handledThakee Nathees
2020-03-05pass keyword inside a class implementedThakee Nathees
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-23Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde
This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-13Remove more deprecated methods and codeRémi Verschelde
2020-02-13Remove deprecated sync and slave networking keywordsRémi Verschelde
Those keywords were deprecated for 3.1 in #22087. Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
2020-01-22Merge pull request #35412 from DaividFrank/check_overriding_selfRémi Verschelde
Disabled re-assigning 'self'
2020-01-22GDScript: Added checks in assign operations to disable re-assigning 'self'DaividFrank
2020-01-18Fix subclass finding in extend statement for sub-sub classesDani Frank
lookup was always done on top level script instead of advancing to subclass each time. this commit changes the lookup to always be at last found subclass
2020-01-16Fix slight problems related to default values of exported typed arraysBojidar Marinov
2020-01-13GDScript: Check function arguments on release tooGeorge Marques
Needed because otherwise the certain type operations (such as type casting) used as a function argument might become unresolved on release, causing a compilation failure. Fix #28680
2020-01-13GDScript: Type match on assignment only if operators have typeGeorge Marques
This ensures that a value without type won't be wrongly assigned to a typed variable when the types mismatch.
2020-01-10GDScript: Forbid using "script" as member nameGeorge Marques
Avoids the user breaking things by creating a "script" variable with something else, effectively overwriting the "script" slot on Object.
2020-01-09GDScript: Fix type name on error message for function parametersGeorge Marques
2020-01-09GDScript: Fix resolution of default parameter valuesGeorge Marques
Fix #26556
2020-01-09Merge pull request #34948 from vnen/gdscript-copy-constructorRémi Verschelde
GDScript: Allow copy constructor for built-in types
2020-01-09GDScript: Allow copy constructor for built-in typesGeorge Marques
Those are implicitly defined in Variant.
2020-01-09Add GDScript warning for standalone expressionGeorge Marques
This makes the error message clearer as it might be used to call functions with side effects.
2020-01-08GDScript: set assign operation on local var made by matchGeorge Marques
This is needed in a all local variables with assigment to properly set the typed operation. Fix #34928
2020-01-08Merge pull request #34918 from vnen/gdscript-assign-opRémi Verschelde
GDScript: enable type checks on release mode
2020-01-08GDScript: enable type checks on release modeGeorge Marques
Also make builtin GDScript functions report return type as Variant in release so type is converted when needed.
2020-01-08GDScript: properly set type of local variable initializationGeorge Marques
Properly sets the type of the identifier for the local variable that is stored in the assignment operation. This makes sure that the compiler is aware of typing for local variables when they are initialized with the declaration.
2020-01-02Allow the usage of newlines in export hintsBojidar Marinov
Fixes #34689
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-13GDScript: Fix type conversion in assignment with operationGeorge Marques
2019-12-04Merge pull request #34067 from bojidar-bg/32370-retype-messageRémi Verschelde
Make error when accidentially redeclaring a variable's type clearer
2019-12-02Make error when accidentially redeclaring a variable's type clearerBojidar Marinov
Fixes #32370
2019-11-15Parser: Check all the arguments of the ternary operatorlupoDharkael
2019-11-07Add setting to exclude addons from script warningsmashumafi
2019-10-25Merge pull request #32808 from bojidar-bg/30937-less-strict-mixed-spacingRémi Verschelde
Allow mixed tabs and spaces when indentation does not depend on tab size
2019-10-25Allow mixed tabs and spaces when indentation does not depend on tab sizeBojidar Marinov
(hopefully) Closes #30937, fixes #32612
2019-10-22Merge pull request #32919 from vnen/gdscript-unused-argsRémi Verschelde
Fix wrong counting of function argument usage
2019-10-19GDScript: Add _ prefix on class name in type compatibility checkGeorge Marques
This makes sure that the classes internally represented with an underscore (_) prefix, such as singletons, are still properly checked for inheritance in the ClassDB.
2019-10-19Fix wrong counting of function argument usageGeorge Marques
There's no need to subtract 1 from the assignment usages because it's not incremented anywhere else. Also put back the assignment with operators because they should not count as usage if the argument is on the left side.
2019-10-14Small fixes to redundand code, copy paste bugsqarmin
2019-09-24GDScript: Fix type resolution not being return in some casesGeorge Marques
Some situations caused the parser node type to not being update when trying to resolve the type, returning invalid data and breaking the parsing when it shouldn't. This patch fix the behavior.
2019-09-22Changed some code found by Clang Tidy and Coverityqarmin
2019-09-20Merge pull request #32150 from luzpaz/typosRémi Verschelde
Fix misc. source comment typos
2019-09-19Fix misc. source comment typosluz.paz
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19Merge pull request #31921 from bojidar-bg/28978-uninitialized-array-valueRémi Verschelde
Fix uninitialized arrays and dictionaries retaining value
2019-09-19Merge pull request #32100 from SaracenOne/gdscript_parent_const_typesRémi Verschelde
Fix const deceleration for inherited scripts above immediate parent
2019-09-19Merge pull request #31934 from mitchcurtis/28187Rémi Verschelde
Produce an error when a class has the same name as a Singleton
2019-09-11GDScript: add an optional message parameter to assert()Mitch Curtis
Before this patch, assert() only took the condition to assert on: assert(item_data) Now, it can optionally take a string that will be printed upon failure: assert(item_data, item_name + " has no item data in ItemDatabase") This makes it easier to immediately see what the issue is by being able to write informative failure messages. Thanks to @wiped1 for sharing their patch, upon which this is based. Closes #17082
2019-09-11Allow for constant deceleration to be detected inherited scripts above the ↵Saracen
immediate parent.