summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_analyzer.cpp
AgeCommit message (Collapse)Author
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-15Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde
GDScript: Refactor builtin functions
2020-12-03Merge pull request #44011 from KoBeWi/red_roses_minus_blue_violetsRémi Verschelde
Fix subtracting colors and quats
2020-12-03Fix subtracting colors and quatsTomasz Chabora
2020-12-02Merge pull request #41095 from ThakeeNathees/GDScript-DocumentationRémi Verschelde
GDScript(2.0) Documentation generation system
2020-11-30GDScript: Don't construct ref values in compilerGeorge Marques
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.
2020-11-29Documentation generation for GDScriptThakee Nathees
- 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
2020-11-27Merge pull request #43914 from ThakeeNathees/range-argument-type-bug-fixRémi Verschelde
GDScript: range function type check bug fixed
2020-11-27GDScript range function typecheck bug fixedThakee Nathees
Fix: #43586
2020-11-26Merge pull request #43895 from vnen/gdscript-operators-fixRémi Verschelde
GDScript: Improve handling of operators
2020-11-26GDScript: Improve handling of operatorsGeorge Marques
- Use the new functions in Variant to determine the validity and resulting type of operators. - Split the operator function in codegen between binary and unary, since the unary ones have now a special requirement of having the second argument to be the NIL type when requesting info.
2020-11-26GDScript: Don't clear depended parsers too soonGeorge Marques
It can wait until the analyzer itself is destructed, otherwise other phases might be using freed parsers.
2020-11-26GDScript: Give an error if dependency can't be parsedGeorge Marques
Otherwise this may lead to a crash when the dependency is not present.
2020-11-26GDScript: Refactor builtin functionsGeorge Marques
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.
2020-11-25GDScript: Fix range() being treated as array when optimized outGeorge Marques
The call of range() in a for loop is optimized to use int or vectors, to avoid allocating an array, however the type was set as array still. With the new typed VM this is an issue as the type mismatch the actual value, resulting in wrong instructions to be selected.
2020-11-09Variant: Rename Type::_RID to Type::RIDRémi Verschelde
The underscore prefix was used to avoid the conflict between the `RID` class name and the matching enum value in `Variant::Type`. This can be fixed differently by prefixing uses of the `RID` class in `Variant` with the scope resolution operator, as done already for `AABB`.
2020-11-09Refactored variant constructor logicreduz
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-11-07Refactored variant setters/gettersreduz
-Discern between named, indexed and keyed -Get direct access to functions for typed GDScript and GDNative bindings -Small changes to some classes in order to work with the new setget binder
2020-11-03Merge pull request #41516 from Lunatoid/allow-object-newRémi Verschelde
Fixed ParseError when calling Object.new()
2020-10-20Merge pull request #41983 from ThakeeNathees/array-const-folding-bug-fixGeorge Marques
Array/Dictionary Nodes no more reduced to array/dictionary variant
2020-09-18Fix typos with codespellRémi Verschelde
Using codespell 1.17.1. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2020-09-11Array/Dictinoary no more reduced to array/dictionary variantThakee Nathees
Fix: #41377 Fix: #20436 Fix: #41953
2020-09-08Merge pull request #41709 from ThakeeNathees/dictionary-indexing-bug-fixRémi Verschelde
Fixed parser error when indexing a dictionary.
2020-09-06GDScript: parameter infer type bug fixThakee Nathees
Fix: #41772
2020-09-03fixed parser error when indexing a dictionary.Thakee Nathees
Fix: #41707
2020-09-02Fixed ParseError when calling Object.new()Lunatoid
Fixes #41462 where calling Object.new() in GDScript gave an error. I fixed it by adding exclusion when checking if the name is a builtin type to exclude objects with a comment detailing why.
2020-09-01Change GDScript compiler to use codegen abstractionGeorge Marques
2020-09-01GDScript: Don't mark function parameters as constantGeorge Marques
They can be reassigned as if it were a local variable.
2020-09-01GDScript: Properly set class inheritance for global classesGeorge Marques
2020-09-01GDScript: Fix analysis of singleton dependenciesGeorge Marques
Sometimes a singleton might depend on another before they are fully compiled so we can't rely on globals in this case.
2020-09-01GDScript: Don't try to parse constant scripts that aren't validGeorge Marques
Since it's likely that they won't parse correctly.
2020-08-26GDScript: Show error when there's an inheritance cycleGeorge Marques
2020-08-26GDScript: Fix issues when deriving from other scriptsGeorge Marques
2020-08-23GDScript: Properly resolve external inner classes from preloadGeorge Marques
This gets the correct parser and class node when resolving from a full GDScript reference.
2020-08-23Merge pull request #41238 from MarianoGnu/gdscript-export-resourceGeorge Marques
Fix GdScript Analyzier not detecting Resource subclass correctly
2020-08-19GDScript: Make subscript access be properly type checkedGeorge Marques
2020-08-19GDScript: Check duplicate keys in dictionaries and enumsGeorge Marques
2020-08-19GDScript: Allow preload() to be used with constant expressionsGeorge Marques
2020-08-18GDScript: Allow enum values to be set to constant expressionsGeorge Marques
Also allow them to access previous values wihout referencing the enum.
2020-08-18GDScript: Allow supertype objects to be assigned to a subtype variableGeorge Marques
It allows `get_node()` to be used with typed variables This is marked as unsafe to warn the user.
2020-08-18GDScript: Allow implicit type conversion when constructing variantsGeorge Marques
Incidentally fix error message when no valid constructor is found which was missing an end parenthesis.
2020-08-17GDSript: Prevent crash when completing unary operatorsGeorge Marques
2020-08-17GDScript: Fix wrong argument check for formatting operatorGeorge Marques
2020-08-13Fix GdScript Analyzier not detecting Resource subclass correctlyMariano Suligoy
2020-08-12Merge pull request #41104 from vnen/gdscript-assignment-tidyGeorge Marques
Tidy up assignment operator check
2020-08-11Merge pull request #41055 from snichols/null-callee-fixRémi Verschelde
Fix crash with null callee
2020-08-08Merge pull request #40673 from ThakeeNathees/gdscript-op-eval-validationGeorge Marques
GDScript operator evaluation validation bug fix
2020-08-08Merge pull request #40951 from bruvzg/gds_cleanupGeorge Marques
[GDScript] Add static HashMap cleanup.
2020-08-08GDScript: Tidy up assignment operator checkGeorge Marques
The operator is already gathered by the parser, no need to do it again in the analyzer.