summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #52329 from ↵Max Hilbrunner2021-09-031-0/+1
|\ | | | | | | | | ZuBsPaCe/gdscript-unused-private-class-variable-fix GDScript: Fix for UNUSED_PRIVATE_CLASS_VARIABLE
| * GDScript: Count usages of member variables.ZuBsPaCe2021-09-031-0/+1
| | | | | | | | Otherwise private member variables will always lead to UNUSED_PRIVATE_CLASS_VARIABLE.
* | Check for GDScript member and class naming conflicts in a variety of conditions.SaracenOne2021-09-021-1/+84
|/
* Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez2021-08-291-1/+1
|
* GDScript: Make singleton functions be seen as staticGeorge Marques2021-08-201-1/+6
| | | | Since those can be called without an instance.
* GDScript: Fix calling builtin static functionsGeorge Marques2021-08-181-1/+3
|
* GDScript: Fix issue when calling `new()` on its ownGeorge Marques2021-08-181-2/+2
|
* GDScript: Fix inner classes and preloaded scripts as typesGeorge Marques2021-08-181-0/+29
|
* Remove underscore hacksMax Hilbrunner2021-08-171-25/+16
| | | | | | Way less cruft. :) Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-29/+26
|
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Merge pull request #49287 from reduz/expose-variant-internal-bindersRémi Verschelde2021-06-191-0/+1
|\ | | | | Make some Variant internal functions public.
| * GDScript: Fix setting type of operator return valueGeorge Marques2021-06-181-0/+1
| | | | | | | | Also write type adjust when needed for binary operators.
* | Merge pull request #49449 from SpectralDragon/fix-enum-equal-operationGeorge Marques2021-06-181-2/+3
|\ \ | |/ |/| Fix equal operation for typed enums
| * Fix equal operation for typed enumsВладислав Прусаков2021-06-091-2/+3
| |
* | Rename Reference to RefCountedPedro J. Estébanez2021-06-111-1/+1
| |
* | Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
| | | | | | | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* | Rename Quat to QuaternionMarcel Admiraal2021-06-041-2/+2
|/
* Rename Variant TRANSFORM to TRANSFORM3DAaron Franke2021-06-031-2/+2
| | | Also _transform to _transform3d
* Merge pull request #49114 from vnen/gdscript-fix-self-function-type-checkRémi Verschelde2021-05-261-0/+2
|\ | | | | GDScript: Fix function signature check for self calls
| * GDScript: Fix function signature check for self callsGeorge Marques2021-05-261-0/+2
| |
* | GDScript: Use analyzer data to decide assignment conversionGeorge Marques2021-05-261-0/+9
|/ | | | | | | 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.
* GDScript: Add support for builtin static method callsGeorge Marques2021-05-161-2/+16
|
* GDScript: Fix crash when base of an attribute is invalidGeorge Marques2021-04-281-0/+6
| | | | | | | 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.
* GDScript: Implement lambdas compilation and runtimeGeorge Marques2021-04-281-7/+28
|
* GDScript: Add lambdas to the type analyzerGeorge Marques2021-04-281-13/+71
| | | | | - Lambdas are always callables (no specific signature match). - Captures from the current context are evaluated.
* GDScript: Add lambda syntax parsingGeorge Marques2021-04-281-0/+4
| | | | | | | | | | | 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")
* GDScript: Fix resolution of dictionary keysGeorge Marques2021-04-231-20/+4
| | | | | | 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.
* Merge pull request #47131 from vnen/gdscript-export-fixRémi Verschelde2021-03-301-71/+35
|\ | | | | Fix a few issues with @export in GDScript
| * Move GDSript annotation application after type-checkingGeorge Marques2021-03-301-71/+35
| | | | | | | | | | | | This ensures that annotations that rely on the datatype (such as @export) can validated it timely, allowing compound expressions instead of only literal values.
* | GDScript: Fix array type check on constantsGeorge Marques2021-03-301-2/+2
|/ | | | | They mistakenly pointing to the wrong union member (variable instead of constant).
* Add typed arrays to GDScriptGeorge Marques2021-03-291-24/+195
| | | | | | | | - Use `Array[type]` for type-hints. e.g.: `var array: Array[int] = [1, 2, 3]` - Array literals are typed if their storage is typed (variable asssignment of as argument in function all). Otherwise they are untyped.
* Merge pull request #43176 from mateosss/crash-uninit-constRémi Verschelde2021-01-111-13/+15
|\ | | | | Fix crash by adding nullcheck for uninitialized constants
| * Fix crash by adding nullcheck for uninitialized constantsMateo de Mayo2020-10-291-13/+15
| |
* | Merge pull request #44719 from ThakeeNathees/assert-argument-bug-fixedRémi Verschelde2021-01-111-1/+4
|\ \ | | | | | | GDScript assert message parsing bug fixed
| * | GDScript assert message parsing bug fixedThakee Nathees2020-12-271-1/+4
| | | | | | | | | | | | Fix: #43540
* | | Merge pull request #44672 from ThakeeNathees/array-dict-const-fold-bug-fixRémi Verschelde2021-01-111-0/+2
|\ \ \ | | | | | | | | Array/Dictionary marked as not safe to const fold
| * | | Array/Dictionary marked as not safe to const foldThakee Nathees2020-12-251-0/+2
| | | | | | | | | | | | | | | | Fix: #44459
* | | | Merge pull request #44889 from ThakeeNathees/builtin-invalid-call-crash-fixRémi Verschelde2021-01-111-2/+2
|\ \ \ \ | | | | | | | | | | GDScript invalid method call on built-in crash fix
| * | | | GDScript builtin invalid function call crash fixThakee Nathees2021-01-031-2/+2
| | |/ / | |/| | | | | | | | | | Fix: #44852
* | | | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* | | | Rename empty() to is_empty()Marcel Admiraal2020-12-281-7/+7
|/ / /
* | | Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde2020-12-151-10/+85
|\ \ \ | | | | | | | | GDScript: Refactor builtin functions
| * | | GDScript: Refactor builtin functionsGeorge Marques2020-11-261-10/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are now called "utility functions" to avoid confusion with methods of builtin types, and be consistent with the naming in Variant. Core utility functions are now available in GDScript. The ones missing in core are added specifically to GDScript as helpers for convenience. Some functions were remove when there are better ways to do, reducing redundancy and cleaning up the global scope.
* | | | Merge pull request #44011 from KoBeWi/red_roses_minus_blue_violetsRémi Verschelde2020-12-031-1/+1
|\ \ \ \ | |_|/ / |/| | | Fix subtracting colors and quats
| * | | Fix subtracting colors and quatsTomasz Chabora2020-12-031-1/+1
| | | |
* | | | Merge pull request #41095 from ThakeeNathees/GDScript-DocumentationRémi Verschelde2020-12-021-1/+6
|\ \ \ \ | |/ / / |/| | | GDScript(2.0) Documentation generation system
| * | | Documentation generation for GDScriptThakee Nathees2020-11-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - ClassDoc added to GDScript and property reflection data were extracted from parse tree - GDScript comments are collected from tokenizer for documentation and applied to the ClassDoc by the GDScript compiler - private docs were excluded (name with underscore prefix and doesn't have any doc comments) - default values (of non exported vars), arguments are extraced from the parser - Integrated with GDScript 2.0 and new enums were added. - merge conflicts fixed
* | | | GDScript: Don't construct ref values in compilerGeorge Marques2020-11-301-1/+21
|/ / / | | | | | | | | | | | | | | | Values that are passed by reference are not suited for being constructed at compile time because in this case they would be shared across all the construction statements.
* | | Merge pull request #43914 from ThakeeNathees/range-argument-type-bug-fixRémi Verschelde2020-11-271-6/+8
|\ \ \ | | | | | | | | GDScript: range function type check bug fixed