summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.h
AgeCommit message (Collapse)Author
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-20[Net] Single `rpc` annotation. "sync" no longer part of mode.Fabio Alessandrelli
- 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).
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-05-26GDScript: Use analyzer data to decide assignment conversionGeorge Marques
Since there might be tricky cases in the analyzer (in the case of unsafe lines) which would need to be properly checked again. Instead, this splits the code generator in two functions and use information set by the analyzer to tell which function to use, without a need to re-check.
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-03-30GDScript: Allow export of enum variablesGeorge Marques
Also fix the enum type in variables to be integer.
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-02Merge pull request #41897 from strank/not-in-conditional-doneRémi Verschelde
Add a "not in" operator to GDScript.
2021-02-08Initialize class/struct variables with default values in modules/Rafał Mikrut
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 #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-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-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-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-09-21Add a "not in" operator to GDScript.strank
2020-09-01Change GDScript compiler to use codegen abstractionGeorge 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-11Merge pull request #41055 from snichols/null-callee-fixRémi Verschelde
Fix crash with null callee
2020-08-05Fixing null callee crash.Stephen Nichols
2020-08-01[GDScript] Add static HashMap cleanup.bruvzg
2020-07-22Wrap up GDScript 2.0 base implementationGeorge Marques
2020-07-20Reintroduce code completionGeorge Marques
2020-07-20Reenable GDScript LSP serverGeorge Marques
2020-07-20Added support for enums to be used as types in GDScriptGeorge Marques
2020-07-20Add warning checks in GDScript analyzerGeorge Marques
Reenable checking those when validating code.
2020-07-20Add new GDScript type checkerGeorge Marques
2020-07-20Add better local variable detection in GDScript parserGeorge Marques
Also store Variant operator to avoid needing to do it repeatedly in later compiling stages.
2020-07-20Add support for propertiesGeorge Marques
2020-07-20New GDScript tokenizer and parserGeorge Marques
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.
2020-05-15break, continue outside of a loop, match statement handledThakee Nathees
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
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.
2020-05-13regression: static func can't access const fixThakee Nathees
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
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.
2020-05-10Merge pull request #37020 from aaronfranke/rangeRémi Verschelde
Allow using integer vectors for iteration and make range() use them
2020-05-10more clearer unexpected statement end error messagesThakee Nathees
2020-05-09Change get_completion_identifier_is_function to return a boolAaron Franke
A minor bugfix
2020-04-27export var type reduce() implementedThakee Nathees
2020-04-02Replace NULL with nullptrlupoDharkael
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-10-25Allow mixed tabs and spaces when indentation does not depend on tab sizeBojidar Marinov
(hopefully) Closes #30937, fixes #32612