summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | duplicate arguments in a function handledThakee Nathees2020-03-061-0/+6
| | |
* | | Merge pull request #36767 from ThakeeNathees/class-pass-fixRémi Verschelde2020-03-101-0/+4
|\ \ \ | | | | | | | | fix: Classes can't have pass
| * | | pass keyword inside a class implementedThakee Nathees2020-03-051-0/+4
| |/ /
* / / logic error in gdscript_parser.cpp for-loop-rangeThakee Nathees2020-03-061-3/+3
|/ / | | | | | | | | there was a logic error in for loop range argument that check if all of the argument were constants, fixed
* | Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde2020-02-231-13/+13
| | | | | | | | | | | | | | | | | | | | 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.
* | Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-15/+15
| | | | | | | | objects and made them default.
* | PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-21/+21
| | | | | | | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* | Remove more deprecated methods and codeRémi Verschelde2020-02-131-4/+0
| |
* | Remove deprecated sync and slave networking keywordsRémi Verschelde2020-02-131-9/+3
| | | | | | | | | | | | Those keywords were deprecated for 3.1 in #22087. Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
* | Merge pull request #35412 from DaividFrank/check_overriding_selfRémi Verschelde2020-01-221-0/+5
|\ \ | | | | | | Disabled re-assigning 'self'
| * | GDScript: Added checks in assign operations to disable re-assigning 'self'DaividFrank2020-01-221-0/+5
| | |
* | | Fix subclass finding in extend statement for sub-sub classesDani Frank2020-01-181-4/+4
|/ / | | | | | | | | 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
* | Fix slight problems related to default values of exported typed arraysBojidar Marinov2020-01-161-25/+26
| |
* | GDScript: Check function arguments on release tooGeorge Marques2020-01-131-4/+0
| | | | | | | | | | | | | | | | 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
* | GDScript: Type match on assignment only if operators have typeGeorge Marques2020-01-131-8/+2
| | | | | | | | | | This ensures that a value without type won't be wrongly assigned to a typed variable when the types mismatch.
* | GDScript: Forbid using "script" as member nameGeorge Marques2020-01-101-3/+9
| | | | | | | | | | Avoids the user breaking things by creating a "script" variable with something else, effectively overwriting the "script" slot on Object.
* | GDScript: Fix type name on error message for function parametersGeorge Marques2020-01-091-1/+1
| |
* | GDScript: Fix resolution of default parameter valuesGeorge Marques2020-01-091-1/+1
| | | | | | | | Fix #26556
* | Merge pull request #34948 from vnen/gdscript-copy-constructorRémi Verschelde2020-01-091-0/+11
|\ \ | | | | | | GDScript: Allow copy constructor for built-in types
| * | GDScript: Allow copy constructor for built-in typesGeorge Marques2020-01-091-0/+11
| | | | | | | | | | | | Those are implicitly defined in Variant.
* | | Add GDScript warning for standalone expressionGeorge Marques2020-01-091-1/+5
|/ / | | | | | | | | This makes the error message clearer as it might be used to call functions with side effects.
* | GDScript: set assign operation on local var made by matchGeorge Marques2020-01-081-1/+1
| | | | | | | | | | | | | | This is needed in a all local variables with assigment to properly set the typed operation. Fix #34928
* | Merge pull request #34918 from vnen/gdscript-assign-opRémi Verschelde2020-01-081-6/+10
|\ \ | | | | | | GDScript: enable type checks on release mode
| * | GDScript: enable type checks on release modeGeorge Marques2020-01-081-6/+10
| | | | | | | | | | | | | | | Also make builtin GDScript functions report return type as Variant in release so type is converted when needed.
* | | GDScript: properly set type of local variable initializationGeorge Marques2020-01-081-0/+1
|/ / | | | | | | | | | | | | 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.
* | Allow the usage of newlines in export hintsBojidar Marinov2020-01-021-40/+48
| | | | | | | | Fixes #34689
* | Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* | GDScript: Fix type conversion in assignment with operationGeorge Marques2019-12-131-17/+24
| |
* | Merge pull request #34067 from bojidar-bg/32370-retype-messageRémi Verschelde2019-12-041-1/+6
|\ \ | |/ |/| Make error when accidentially redeclaring a variable's type clearer
| * Make error when accidentially redeclaring a variable's type clearerBojidar Marinov2019-12-021-1/+6
| | | | | | | | Fixes #32370
* | Parser: Check all the arguments of the ternary operatorlupoDharkael2019-11-151-0/+2
|/
* Add setting to exclude addons from script warningsmashumafi2019-11-071-0/+3
|
* Merge pull request #32808 from bojidar-bg/30937-less-strict-mixed-spacingRémi Verschelde2019-10-251-26/+50
|\ | | | | Allow mixed tabs and spaces when indentation does not depend on tab size
| * Allow mixed tabs and spaces when indentation does not depend on tab sizeBojidar Marinov2019-10-251-26/+50
| | | | | | | | (hopefully) Closes #30937, fixes #32612
* | Merge pull request #32919 from vnen/gdscript-unused-argsRémi Verschelde2019-10-221-5/+17
|\ \ | | | | | | Fix wrong counting of function argument usage
| * | Fix wrong counting of function argument usageGeorge Marques2019-10-191-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | GDScript: Add _ prefix on class name in type compatibility checkGeorge Marques2019-10-191-1/+7
|/ / | | | | | | | | | | This makes sure that the classes internally represented with an underscore (_) prefix, such as singletons, are still properly checked for inheritance in the ClassDB.
* / Small fixes to redundand code, copy paste bugsqarmin2019-10-141-3/+1
|/
* GDScript: Fix type resolution not being return in some casesGeorge Marques2019-09-241-1/+2
| | | | | | 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.
* Changed some code found by Clang Tidy and Coverityqarmin2019-09-221-3/+0
|
* Merge pull request #32150 from luzpaz/typosRémi Verschelde2019-09-201-1/+1
|\ | | | | Fix misc. source comment typos
| * Fix misc. source comment typosluz.paz2019-09-191-1/+1
| | | | | | 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 `
* | Merge pull request #31921 from bojidar-bg/28978-uninitialized-array-valueRémi Verschelde2019-09-191-33/+44
|\ \ | | | | | | Fix uninitialized arrays and dictionaries retaining value
| * | Fix uninitialized arrays and dictionaries retaining valueBojidar Marinov2019-09-031-33/+44
| |/ | | | | | | Fixes #28978
* | Merge pull request #32100 from SaracenOne/gdscript_parent_const_typesRémi Verschelde2019-09-191-14/+21
|\ \ | | | | | | Fix const deceleration for inherited scripts above immediate parent
| * | Allow for constant deceleration to be detected inherited scripts above the ↵Saracen2019-09-111-14/+21
| |/ | | | | | | immediate parent.
* | Merge pull request #31934 from mitchcurtis/28187Rémi Verschelde2019-09-191-0/+9
|\ \ | | | | | | Produce an error when a class has the same name as a Singleton
| * | Produce an error when a class has the same name as a SingletonMitch Curtis2019-09-061-0/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you somehow end up with a Singleton.gd that looks like this: extends Node class_name Singleton func foo(): pass You will get an error when using it in another file: extends Node2D func _init(): # Parser Error: Non-static function "foo" can only be called from an instance. Singleton.foo() This error is confusing. This patch ensures that an error on the class_name line will be produced: Parse Error: The class "Singleton" conflicts with the AutoLoad singleton of the same name, and is therefore redundant. Remove the class_name declaration to fix this error. Fixes #28187.
* / GDScript: add an optional message parameter to assert()Mitch Curtis2019-09-111-6/+27
|/ | | | | | | | | | | | | | | | | 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