summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
AgeCommit message (Collapse)Author
2021-04-28GDScript: Fix crash when base of an attribute is invalidGeorge Marques
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.
2021-04-28GDScript: Implement lambdas compilation and runtimeGeorge Marques
2021-04-28GDScript: Add lambdas to the type analyzerGeorge Marques
- Lambdas are always callables (no specific signature match). - Captures from the current context are evaluated.
2021-04-28GDScript: Add lambda syntax parsingGeorge Marques
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")
2021-04-23GDScript: Make sure Lua-style dicts use StringName as keysGeorge Marques
2021-04-14Fix corrupt scene when export var has setterJulien Nguyen
2021-03-30GDScript: Implement export of typed arraysGeorge Marques
2021-03-30GDScript: Allow export of enum variablesGeorge Marques
Also fix the enum type in variables to be integer.
2021-03-30GDScript: Show error on invalid initializer expressionGeorge Marques
2021-03-30Move GDSript annotation application after type-checkingGeorge Marques
This ensures that annotations that rely on the datatype (such as @export) can validated it timely, allowing compound expressions instead of only literal values.
2021-03-29Add typed arrays to GDScriptGeorge Marques
- 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.
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-10Implement Navigation layersGilles Roudière
2021-03-02Merge pull request #42029 from ThakeeNathees/export-type-infer-bug-fixGeorge Marques
GDScript export array/dictionary type infer bug fix
2021-03-02Merge pull request #41897 from strank/not-in-conditional-doneRémi Verschelde
Add a "not in" operator to GDScript.
2021-01-11Merge pull request #44719 from ThakeeNathees/assert-argument-bug-fixedRémi Verschelde
GDScript assert message parsing bug fixed
2021-01-11Merge pull request #44818 from ThakeeNathees/const-crash-fixRémi Verschelde
GDScript crash at incomplete const bug fix
2021-01-11Merge pull request #45076 from ↵Rémi Verschelde
ThakeeNathees/gdscript-operator-precedence-bug-fix GDScript operator `+` `-` precedence bug fix
2021-01-10GDScript operator `+` `-` precedence bug fixThakee Nathees
Fix: #43265
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-30GDScript crash at incomplete const bug fixThakee Nathees
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-27GDScript assert message parsing bug fixedThakee Nathees
Fix: #43540
2020-12-15Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde
GDScript: Refactor builtin functions
2020-12-02Refactor DocData into core and editor (DocTools) partsThakee Nathees
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 #43500 from AndreaCatania/gds_fixesRémi Verschelde
Fixes crash when parse_expression returns nullptr.
2020-11-27Merge pull request #43226 from mateosss/unreachable-prop-crashGeorge Marques
Fix crash due to unreachable code in properties
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-13Fixes crash when returns .Andrea Catania
2020-11-10Fix completion for built-in load functionGustav
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-10-30Fix crash due to unreachable code in propertiesMateo de Mayo
2020-09-21Add a "not in" operator to GDScript.strank
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-13GDScript export array/dictionary type infer bug fixThakee Nathees
Fix : #41980
2020-09-03[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg
2020-09-01Change GDScript compiler to use codegen abstractionGeorge Marques
2020-09-01GDScript: Allow "extends" to be used inside inner classGeorge Marques
2020-09-01GDScript: Allow "self" to be used in class levelGeorge Marques
2020-08-26GDScript: Fix crash when parsing propertiesGeorge Marques
2020-08-26GDScript: Fix issues when deriving from other scriptsGeorge Marques
2020-08-19GDScript: Show error when function return type is missingGeorge Marques
2020-08-19GDScript: Fix signal parameters not respecting commasGeorge 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-19GDScript: Allow keywords to be used in $ notationGeorge 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.