summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: Fix crash when base of an attribute is invalidGeorge Marques2021-04-281-1/+1
| | | | | | | 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-3/+3
|
* GDScript: Add lambdas to the type analyzerGeorge Marques2021-04-281-5/+20
| | | | | - Lambdas are always callables (no specific signature match). - Captures from the current context are evaluated.
* GDScript: Add lambda syntax parsingGeorge Marques2021-04-281-57/+182
| | | | | | | | | | | 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: Make sure Lua-style dicts use StringName as keysGeorge Marques2021-04-231-0/+2
|
* Fix corrupt scene when export var has setterJulien Nguyen2021-04-141-2/+1
|
* GDScript: Implement export of typed arraysGeorge Marques2021-03-301-1/+19
|
* GDScript: Allow export of enum variablesGeorge Marques2021-03-301-2/+19
| | | | Also fix the enum type in variables to be integer.
* GDScript: Show error on invalid initializer expressionGeorge Marques2021-03-301-0/+3
|
* Move GDSript annotation application after type-checkingGeorge Marques2021-03-301-23/+82
| | | | | | This ensures that annotations that rely on the datatype (such as @export) can validated it timely, allowing compound expressions instead of only literal values.
* Add typed arrays to GDScriptGeorge Marques2021-03-291-0/+16
| | | | | | | | - 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.
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* Implement Navigation layersGilles Roudière2021-03-101-0/+2
|
* Merge pull request #42029 from ThakeeNathees/export-type-infer-bug-fixGeorge Marques2021-03-021-2/+7
|\ | | | | GDScript export array/dictionary type infer bug fix
| * GDScript export array/dictionary type infer bug fixThakee Nathees2020-09-131-2/+7
| | | | | | | | Fix : #41980
* | Merge pull request #41897 from strank/not-in-conditional-doneRémi Verschelde2021-03-021-1/+12
|\ \ | | | | | | Add a "not in" operator to GDScript.
| * | Add a "not in" operator to GDScript.strank2020-09-211-1/+12
| | |
* | | Merge pull request #44719 from ThakeeNathees/assert-argument-bug-fixedRémi Verschelde2021-01-111-6/+3
|\ \ \ | | | | | | | | GDScript assert message parsing bug fixed
| * | | GDScript assert message parsing bug fixedThakee Nathees2020-12-271-6/+3
| | | | | | | | | | | | | | | | Fix: #43540
* | | | Merge pull request #44818 from ThakeeNathees/const-crash-fixRémi Verschelde2021-01-111-0/+2
|\ \ \ \ | | | | | | | | | | GDScript crash at incomplete const bug fix
| * | | | GDScript crash at incomplete const bug fixThakee Nathees2020-12-301-0/+2
| |/ / /
* | | | Merge pull request #45076 from ↵Rémi Verschelde2021-01-111-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | ThakeeNathees/gdscript-operator-precedence-bug-fix GDScript operator `+` `-` precedence bug fix
| * | | | GDScript operator `+` `-` precedence bug fixThakee Nathees2021-01-101-2/+2
| |/ / / | | | | | | | | | | | | Fix: #43265
* | | | 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-21/+21
|/ / /
* | | Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde2020-12-151-10/+1
|\ \ \ | | | | | | | | GDScript: Refactor builtin functions
| * | | GDScript: Refactor builtin functionsGeorge Marques2020-11-261-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Refactor DocData into core and editor (DocTools) partsThakee Nathees2020-12-021-16/+2
| | | |
* | | | Documentation generation for GDScriptThakee Nathees2020-11-291-0/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | Merge pull request #43500 from AndreaCatania/gds_fixesRémi Verschelde2020-11-271-1/+3
|\ \ \ \ | | | | | | | | | | Fixes crash when parse_expression returns nullptr.
| * | | | Fixes crash when returns .Andrea Catania2020-11-131-1/+3
| |/ / /
* | | | Merge pull request #43226 from mateosss/unreachable-prop-crashGeorge Marques2020-11-271-1/+5
|\ \ \ \ | |/ / / |/| | | Fix crash due to unreachable code in properties
| * | | Fix crash due to unreachable code in propertiesMateo de Mayo2020-10-301-1/+5
| |/ /
* | | Fix completion for built-in load functionGustav2020-11-101-19/+21
| | |
* | | Variant: Rename Type::_RID to Type::RIDRémi Verschelde2020-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | | Refactored variant constructor logicreduz2020-11-091-2/+6
| | |
* | | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-2/+2
|/ / | | | | | | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* / Fix typos with codespellRémi Verschelde2020-09-181-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-1/+1
|
* Change GDScript compiler to use codegen abstractionGeorge Marques2020-09-011-1/+12
|
* GDScript: Allow "extends" to be used inside inner classGeorge Marques2020-09-011-0/+8
|
* GDScript: Allow "self" to be used in class levelGeorge Marques2020-09-011-2/+2
|
* GDScript: Fix crash when parsing propertiesGeorge Marques2020-08-261-1/+1
|
* GDScript: Fix issues when deriving from other scriptsGeorge Marques2020-08-261-1/+0
|
* GDScript: Show error when function return type is missingGeorge Marques2020-08-191-0/+3
|
* GDScript: Fix signal parameters not respecting commasGeorge Marques2020-08-191-2/+9
|
* GDScript: Check duplicate keys in dictionaries and enumsGeorge Marques2020-08-191-1/+7
|
* GDScript: Allow preload() to be used with constant expressionsGeorge Marques2020-08-191-23/+0
|
* GDScript: Allow keywords to be used in $ notationGeorge Marques2020-08-191-3/+6
|
* GDScript: Allow enum values to be set to constant expressionsGeorge Marques2020-08-181-12/+10
| | | | Also allow them to access previous values wihout referencing the enum.