summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.h
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: Implement lambdas compilation and runtimeGeorge Marques2021-04-281-1/+2
|
* GDScript: Add lambdas to the type analyzerGeorge Marques2021-04-281-6/+16
| | | | | - Lambdas are always callables (no specific signature match). - Captures from the current context are evaluated.
* GDScript: Add lambda syntax parsingGeorge Marques2021-04-281-5/+24
| | | | | | | | | | | 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: Allow export of enum variablesGeorge Marques2021-03-301-1/+1
| | | | Also fix the enum type in variables to be integer.
* Move GDSript annotation application after type-checkingGeorge Marques2021-03-301-0/+1
| | | | | | 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-2/+58
| | | | | | | | - 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 #41897 from strank/not-in-conditional-doneRémi Verschelde2021-03-021-0/+1
|\ | | | | Add a "not in" operator to GDScript.
| * Add a "not in" operator to GDScript.strank2020-09-211-0/+1
| |
* | Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-081-3/+3
| |
* | Merge pull request #44719 from ThakeeNathees/assert-argument-bug-fixedRémi Verschelde2021-01-111-1/+1
|\ \ | | | | | | GDScript assert message parsing bug fixed
| * | GDScript assert message parsing bug fixedThakee Nathees2020-12-271-1/+1
| | | | | | | | | | | | Fix: #43540
* | | Merge pull request #45076 from ↵Rémi Verschelde2021-01-111-2/+1
|\ \ \ | | | | | | | | | | | | | | | | ThakeeNathees/gdscript-operator-precedence-bug-fix GDScript operator `+` `-` precedence bug fix
| * | | GDScript operator `+` `-` precedence bug fixThakee Nathees2021-01-101-2/+1
| |/ / | | | | | | | | | 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 🎆
* | Merge pull request #43890 from vnen/gdscript-builtin-functions-refactorRémi Verschelde2020-12-151-2/+0
|\ \ | | | | | | GDScript: Refactor builtin functions
| * | GDScript: Refactor builtin functionsGeorge Marques2020-11-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | |
* | | Documentation generation for GDScriptThakee Nathees2020-11-291-0/+38
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* / Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-11/+11
|/ | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Change GDScript compiler to use codegen abstractionGeorge Marques2020-09-011-0/+2
|
* GDScript: Allow enum values to be set to constant expressionsGeorge Marques2020-08-181-1/+4
| | | | Also allow them to access previous values wihout referencing the enum.
* Merge pull request #41055 from snichols/null-callee-fixRémi Verschelde2020-08-111-0/+8
|\ | | | | Fix crash with null callee
| * Fixing null callee crash.Stephen Nichols2020-08-051-0/+8
| |
* | [GDScript] Add static HashMap cleanup.bruvzg2020-08-011-0/+1
|/
* Wrap up GDScript 2.0 base implementationGeorge Marques2020-07-221-4/+32
|
* Reintroduce code completionGeorge Marques2020-07-201-1/+59
|
* Reenable GDScript LSP serverGeorge Marques2020-07-201-0/+29
|
* Added support for enums to be used as types in GDScriptGeorge Marques2020-07-201-3/+9
|
* Add warning checks in GDScript analyzerGeorge Marques2020-07-201-6/+56
| | | | Reenable checking those when validating code.
* Add new GDScript type checkerGeorge Marques2020-07-201-1/+4
|
* Add better local variable detection in GDScript parserGeorge Marques2020-07-201-16/+128
| | | | | Also store Variant operator to avoid needing to do it repeatedly in later compiling stages.
* Add support for propertiesGeorge Marques2020-07-201-0/+22
|
* New GDScript tokenizer and parserGeorge Marques2020-07-201-492/+829
| | | | | | | | | | Sometimes to fix something you have to break it first. This get GDScript mostly working with the new tokenizer and parser but a lot of things isn't working yet. It compiles and it's usable, and that should be enough for now. Don't worry: other huge commits will come after this.
* break, continue outside of a loop, match statement handledThakee Nathees2020-05-151-0/+2
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-2/+4
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-6/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-68/+67
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* regression: static func can't access const fixThakee Nathees2020-05-131-1/+1
|
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-2/+4
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Merge pull request #37020 from aaronfranke/rangeRémi Verschelde2020-05-101-1/+1
|\ | | | | Allow using integer vectors for iteration and make range() use them
| * Change get_completion_identifier_is_function to return a boolAaron Franke2020-05-091-1/+1
| | | | | | | | A minor bugfix
* | more clearer unexpected statement end error messagesThakee Nathees2020-05-101-0/+1
|/
* export var type reduce() implementedThakee Nathees2020-04-271-0/+1
|
* Replace NULL with nullptrlupoDharkael2020-04-021-12/+12
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Allow mixed tabs and spaces when indentation does not depend on tab sizeBojidar Marinov2019-10-251-1/+21
| | | | (hopefully) Closes #30937, fixes #32612
* Merge pull request #31921 from bojidar-bg/28978-uninitialized-array-valueRémi Verschelde2019-09-191-0/+1
|\ | | | | Fix uninitialized arrays and dictionaries retaining value
| * Fix uninitialized arrays and dictionaries retaining valueBojidar Marinov2019-09-031-0/+1
| | | | | | | | Fixes #28978
* | GDScript: add an optional message parameter to assert()Mitch Curtis2019-09-111-1/+6
|/ | | | | | | | | | | | | | | | | Before this patch, assert() only took the condition to assert on: assert(item_data) Now, it can optionally take a string that will be printed upon failure: assert(item_data, item_name + " has no item data in ItemDatabase") This makes it easier to immediately see what the issue is by being able to write informative failure messages. Thanks to @wiped1 for sharing their patch, upon which this is based. Closes #17082
* Add GDScript Language Protocol plugingeequlim2019-08-111-0/+1
|