summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when parsing Dictionarykobewi2021-08-101-1/+3
|
* [Net] Default @rpc annotation should be puppet, not master.Fabio Alessandrelli2021-08-061-1/+1
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-5/+5
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-11/+10
|
* Use the standard C `INFINITY` and `NAN` constants directlyHugo Locurcio2021-07-211-2/+2
| | | | | | | The `Math_INF` and `Math_NAN` defines were just aliases for those constants, so we might as well use them directly. Some portions of the code were already using `INFINITY` directly.
* [Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli2021-07-201-16/+44
| | | | | | | | | | | | | | | | - Move the "sync" property for RPCs to RPCConfig. - Unify GDScript annotations into a single one: - `@rpc(master)` # default - `@rpc(puppet)` - `@rpc(any)` # former `@remote` - Implement three additional `@rpc` options: - The second parameter is the "sync" option (which also calls the function locally when RPCing). One of "sync", "nosync". - The third parameter is the transfer mode (reliable, unreliable, ordered). - The third parameter is the channel (unused for now).
* Fix editor suffixes and degrees conversionreduz2021-06-301-1/+0
| | | | | | | | | | | | | * Functions to convert to/from degrees are all gone. Conversion is done by the editor. * Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees. * Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m" * In general, can add suffixes for EditorSpinSlider Not covered by this PR, will have to be addressed by future ones: * Ability to switch radians/degrees in the inspector for angle properties (if actually wanted). * Animations previously made will most likely break, need to add a way to make old ones compatible. * Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes. * Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
* Adding some more missing renames for Transform3D and QuaternionBastiaan Olij2021-06-151-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-1/+1
|
* Rename Variant TRANSFORM to TRANSFORM3DAaron Franke2021-06-031-1/+1
| | | Also _transform to _transform3d
* Fix typos with codespellRémi Verschelde2021-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD 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 ```
* 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 ```