summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #51671 from RandomShaper/fix_gdscript_crashGeorge Marques2021-09-171-6/+21
|\ | | | | Fix some GDScript bugs
| * Fix parameter type resolution in GDScriptPedro J. Estébanez2021-09-111-2/+1
| |
| * Implement iterator variable typing in GDScriptPedro J. Estébanez2021-09-111-4/+20
| |
* | GDScript: Avoid inferred types from giving hard errorsGeorge Marques2021-09-171-3/+16
| |
* | Merge pull request #50456 from Blackiris/fix-extends-parent-relativeGeorge Marques2021-09-151-0/+3
|\ \ | | | | | | Fix extends with relative path to parent script
| * | Fix extends with relative path to parent scriptJulien Nguyen2021-09-051-0/+3
| | |
* | | Merge pull request #52582 from ↵Rémi Verschelde2021-09-151-0/+4
|\ \ \ | | | | | | | | | | | | jmb462/Prevent-non-explicit-inferring-parameter-from-null
| * | | Prevent non explicit inferring parameter from nulljmb4622021-09-111-0/+4
| | | |
* | | | Merge pull request #52632 from vnen/autoload-global-script-class-conflictRémi Verschelde2021-09-131-1/+12
|\ \ \ \ | | | | | | | | | | Disallow class names to be the same as global names
| * | | | Disallow class names to be the same as global namesGeorge Marques2021-09-131-1/+12
| |/ / / | | | | | | | | | | | | Also forbid autoloads to have the same name as global script class.
* | | | Merge pull request #52100 from vnen/gdscript-access-outer-constantsRémi Verschelde2021-09-131-9/+25
|\ \ \ \ | |/ / / |/| | | GDScript: Allow access to outer constant and enum values
| * | | GDScript: Allow access to outer constant and enum valuesGeorge Marques2021-08-241-9/+25
| | |/ | |/|
* | | Merge pull request #49897 from Blackiris/fix-dollar-point-crash-on-editorGeorge Marques2021-09-101-0/+3
|\ \ \ | |_|/ |/| | Fix crash when writing $. in the editor
| * | Fix crash when writing $. in the editorJulien Nguyen2021-07-081-0/+3
| | |
* | | 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