summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: invalidate GDScriptParserRef when reloadingrune-scape2024-04-181-11/+25
|
* Fix multiline array/dictionary match statementsAiden Storey2024-04-121-15/+19
| | | | | | | | | | | Currently array and dictionary expressions cannot be spread over multiple lines in match statements. Adding mutliline push/pop while parsing the pattern for bracket and brace enables the ability for these to be multiline. This enables more complex patterns to be matched without exceeding line limits. Fixes #90372
* GDScript: Don't warn on unassigned for builtin-typed variablesGeorge Marques2024-04-101-22/+0
| | | | | | | | | | | If the type of a variable is a built-in Variant type, then it will automatically be assigned a default value based on the type. This means that the explicit initialization may be unnecessary. Thus this commit removes the warning in such case. This also changes the meaning of the unassigned warning to happen when the variable is used before being assigned, not when it has zero assignments.
* Merge pull request #89270 from Repiteo/enforce-typename-in-templatesRémi Verschelde2024-03-141-1/+1
|\ | | | | | | Enforce template syntax `typename` over `class`
| * Enforce template syntax `typename` over `class`Thaddeus Crews2024-03-071-1/+1
| |
* | GDScript: Fix `@warning_ignore` annotation issuesDanil Alexeev2024-03-121-89/+227
| |
* | Editor Help: Add syntax highlighting for code blocksDanil Alexeev2024-03-091-5/+19
|/
* GDScript: Add @export_custom annotationGeorge Marques2024-03-071-0/+25
| | | | | | Allows setting any arbitrary hint, hint string, and usage flags. Useful for more complex hints or potential future hints not available as a dedicated annotation.
* Support Array and PackedArray in @export_*Abel Toy2024-03-061-49/+94
|
* Merge pull request #82122 from dalexeev/gds-add-export-hidden-annotationRémi Verschelde2024-02-271-6/+15
|\ | | | | | | GDScript: Add `@export_storage` annotation
| * GDScript: Add `@export_storage` annotationDanil Alexeev2023-12-191-6/+15
| |
* | GDScript: Canonicalize script path in FQCNDanil Alexeev2024-02-261-2/+2
| |
* | Documentation: Add support for deprecated/experimental messagesDanil Alexeev2024-02-151-4/+16
| |
* | Replace error checks against `size` with `is_empty`A Thousand Ships2024-02-091-1/+1
| |
* | GDScript: Enable compression on exportGeorge Marques2024-02-081-0/+3
| | | | | | | | | | | | | | | | Besides the regular option to export GDScript as binary tokens, this also includes a compression option on top of it. The binary format needs to encode some information which generally makes it bigger than the source text. This option reduces that difference by using Zstandard compression on the buffer.
* | GDScript: Reintroduce binary tokenization on exportGeorge Marques2024-02-081-27/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds back a function available in 3.x: exporting the GDScript files in a binary form by converting the tokens recognized by the tokenizer into a data format. It is enabled by default on export but can be manually disabled. The format helps with loading times since, the tokens are easily reconstructed, and with hiding the source code, since recovering it would require a specialized tool. Code comments are not stored in this format. The `--test` command can also include a `--use-binary-tokens` flag which will run the GDScript tests with the binary format instead of the regular source code by converting them in-memory before the test runs.
* | Merge pull request #87124 from rsubtil/bugfix-warn_as_errRémi Verschelde2024-02-081-1/+1
|\ \ | | | | | | | | | Simplify script paths to ensure proper resource path checks
| * | Simplify script paths to ensure proper resource path checksRicardo Subtil2024-01-121-1/+1
| |/
* | GDScript: Add `is not` operatorDanil Alexeev2024-02-041-1/+27
| |
* | Revert "Add UID support to GDScript files"Rémi Verschelde2024-01-291-35/+3
| | | | | | | | | | | | | | | | | | | | | | This reverts commit c7f68a27ec4b825302998eeb5a400f869cd21cf7. We still think GDScript files need UIDs to allow safe refactoring, but we're still debating what form those should take exactly. So far there seems to be agreement that it shouldn't be done via an annotation as implemented here, so we're reverting this one for now, to revisit the feature in a future PR.
* | Remove unnecessary `this->` expressionsA Thousand Ships2024-01-291-4/+4
| |
* | Add UID support to GDScript fileskobewi2024-01-171-3/+35
| |
* | Merge pull request #83120 from ↵Rémi Verschelde2024-01-041-3/+7
|\ \ | | | | | | | | | | | | | | | dalexeev/gds-allow-property-getter-empty-parentheses GDScript: Allow empty parentheses for property getter declaration
| * | GDScript: Allow empty parentheses for property getter declarationDanil Alexeev2023-10-111-3/+7
| | |
* | | Merge pull request #84445 from Rubonnek/add-const-references-clang-tidyRémi Verschelde2024-01-041-1/+1
|\ \ \ | |_|/ |/| | | | | Add const references detected by clang-tidy
| * | Add const references detected by clang-tidyWilson E. Alvarez2023-12-161-1/+1
| | |
* | | Merge pull request #85487 from vnen/gdscript-static-register-annotationsYuri Sizov2023-12-191-35/+39
|\ \ \ | |/ / |/| | | | | GDScript: Make annotations register statically in parser
| * | GDScript: Make annotations register statically in parserGeorge Marques2023-11-281-35/+39
| |/ | | | | | | | | So it only register the annotations once per run instead of doing it every time a script is parsed.
* / Change container_element_type to vector containerThaddeus Crews2023-12-051-26/+33
|/
* Merge pull request #83050 from k0T0z/fix-unnecessary-includeRémi Verschelde2023-10-101-4/+0
|\ | | | | | | Deleting unnecessary include in GDScriptParser
| * removing unnecessary include of gdscript_warning.h as it is already included ↵Saif Kandil2023-10-091-4/+0
| | | | | | | | | | | | in the header file Signed-off-by: Saif Kandil <74428638+k0T0z@users.noreply.github.com>
* | Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-10-081-1/+1
|/
* GDScript: Add error when exporting node in non [Node]-derived classesDanil Alexeev2023-10-051-29/+35
|
* Merge pull request #80085 from vnen/gdscript-pattern-guardsYuri Sizov2023-09-281-1/+32
|\ | | | | | | GDScript: Implement pattern guards for match statement
| * GDScript: Implement pattern guards for match statementGeorge Marques2023-09-271-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | Within a match statement, it is now possible to add guards in each branch: var a = 0 match a: 0 when false: print("does not run") 0 when true: print("but this does") This allows more complex logic for deciding which branch to take.
* | Merge pull request #75988 from dalexeev/gds-unsafe-call-argumentYuri Sizov2023-09-271-3/+10
|\ \ | |/ |/| | | GDScript: Improve call analysis
| * GDScript: Improve call analysisDanil Alexeev2023-09-211-3/+10
| | | | | | | | | | | | * Add missing `UNSAFE_CALL_ARGUMENT` warning. * Fix `Object` constructor. * Display an error for non-existent static methods.
* | [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-261-1/+1
|/
* Merge pull request #81699 from dalexeev/gds-fix-and-improve-doc-comment-parsingRémi Verschelde2023-09-201-108/+77
|\ | | | | | | GDScript: Fix and improve doc comment parsing
| * GDScript: Fix and improve doc comment parsingDanil Alexeev2023-09-161-108/+77
| |
* | GDScript: Fix subscript resolution for constant non-metatypesDanil Alexeev2023-09-191-17/+21
|/
* Merge pull request #81079 from dalexeev/gds-fix-get-method-listRémi Verschelde2023-09-111-0/+100
|\ | | | | | | GDScript: Fix `get_*_list()` methods return incorrect info
| * GDScript: Fix `get_*_list()` methods return incorrect infoDanil Alexeev2023-09-041-0/+100
| |
* | Add coloring for completion of vector componentsYuri Rubinsky2023-08-301-0/+13
|/
* Merge pull request #75656 from YuriSizov/core-iconic-builtinsRémi Verschelde2023-08-291-2/+15
|\ | | | | | | Add a script method to get its class icon
| * Add a script method to get its class iconYuri Sizov2023-08-241-2/+15
| | | | | | | | Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
* | Merge pull request #80964 from dalexeev/gds-allow-use-local-consts-as-typesYuri Sizov2023-08-251-3/+1
|\ \ | | | | | | | | | GDScript: Allow use local constants as types
| * | GDScript: Allow use local constants as typesDanil Alexeev2023-08-251-3/+1
| |/
* / GDScript: Fix lambda resolution with cyclic referencesDanil Alexeev2023-08-251-0/+6
|/
* GDScript: Add static typing for `for` loop variableDanil Alexeev2023-08-171-1/+12
|