summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_compiler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-27/+27
| | | | Fixes #25316.
* GDScript: Remove unused `switch`, `case` and `do` CF keywordsRémi Verschelde2019-02-201-3/+0
| | | | | | | | | | | | They had been reserved for future implementation, but we now have the `match` CF keyword which does the same and more. According to @reduz `do` was even added by mistake when copying from the shader language parser, it was never intended to add support for `do`... `while` loops, as the syntax would be awkward in GDScript, and the added sugar is not worth it. Fixes #25787.
* GDScript compiler: check if subclass exists before comparisonGeorge Marques2019-01-171-2/+2
| | | | | Otherwise these checks might trigger the insertion of an empty value, leading to crashes.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix many errors found by PVS-StudioAaron Franke2018-11-281-1/+1
| | | Fix errors 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, and 15.
* Revert "Fix crash on signal/resume to dangling target"Pedro J. Estébanez2018-11-241-10/+10
| | | | This reverts commit 54bdc1e1f6a7fb85a5b193c9b8ecf0dcf06949e6.
* Fix crash on signal/resume to dangling targetPedro J. Estébanez2018-10-171-10/+10
| | | | Fixes #22443.
* GDScript: Fix stack address test in compilerGeorge Marques2018-09-191-8/+8
|
* Misc. typosluz.paz2018-09-121-1/+1
| | | Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
* Merge pull request #21449 from vnen/gdscript-builtin-isRémi Verschelde2018-08-271-0/+19
|\ | | | | Allow `is` operator to test built-in types
| * GDScript: Allow `is` operator to test built-in typesGeorge Marques2018-08-261-0/+19
| |
* | Fixes several resource leaks in ...Crazy-P2018-08-261-0/+9
|/ | | | | | | | - gdscript - gdscript_compiler - regex - android/export - gles3/rasterizer (scene and storage)
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-4/+0
|
* GDSCript: Fix cyclic class dependency detectionGeorge Marques2018-08-211-2/+4
|
* GDScript: Fix main script detectionGeorge Marques2018-07-251-4/+4
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-18/+18
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Use type information to enable GDScript introspectionGeorge Marques2018-07-201-39/+61
| | | | | This makes the Script API provide accurate information when requesting property or method info.
* Add typed instructions to GDScriptGeorge Marques2018-07-201-6/+165
| | | | | | | - Typed assignment (built-in, native, and script). - Cast (built-in conversion; native and script checks). - Check type of functions arguments on call. - Check type of members on set.
* Add static type checks in the parserGeorge Marques2018-07-201-13/+6
| | | | | | | | | | | | - Resolve types for all identifiers. - Error when identifier is not found. - Match return type and error when not returning a value when it should. - Check unreachable code (code after sure return). - Match argument count and types for function calls. - Determine if return type of function call matches the assignment. - Do static type check with match statement when possible. - Use type hints to determine export type. - Check compatibility between type hint and explicit export type.
* Move inheritance resolution to the parserGeorge Marques2018-07-201-227/+113
|
* Add typing syntaxGeorge Marques2018-07-201-0/+4
|
* Style: Format code with clang-format 6.0.1Rémi Verschelde2018-07-181-1/+1
|
* Global class names (and GDScript support for it)Juan Linietsky2018-07-151-0/+35
|
* Fix onready vars / vars accessing class members if _ready / _init not presentMarcin Zawiejski2018-06-181-1/+1
|
* Fix positive operator in GDScript compilerGeorge Marques2018-05-231-0/+3
|
* Enable autoload in editorGeorge Marques2018-05-011-0/+24
| | | | | | - Tool scripts will be executed and can be accessed by plugins. - Other script languages can implement add/remove_named_global_constant to make use of this functionality.
* Fix typos with codespellluz.paz2018-02-211-1/+1
| | | | | | | | | | | | | | Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```
* Allow shadowing class members with local variables in GDScript, closes #15896Juan Linietsky2018-01-201-14/+24
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-1/+1
|
* Allow to extends constant variablesanikoyes2017-11-201-1/+24
|
* GDScript: Refactor "GD" class prefix to "GDScript"Rémi Verschelde2017-11-161-0/+2044