summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2018-08-21GDScript: Ignore unused arguments/local vars that start with _George Marques
Makes it simple to ignore particular arguments without adding special comments, especially in engine-defined functions.
2018-08-21GDScript: Show warning messages only on debuggerGeorge Marques
Don't show on console/output anymore.
2018-08-21GDScript: Fix undefined behavior on GDScriptTokenizerBufferGeorge Marques
2018-08-21GDScript: Forbid invalid identifiers in match bindingsGeorge Marques
Also forbid shadowing a variable from an upper scope.
2018-08-21GDSCript: Fix cyclic class dependency detectionGeorge Marques
2018-08-19Highlight multiline strings as strings instead of commentsHugo Locurcio
Since multiline comments are not officially supported in GDScript, it is more common to see multiline strings being used as strings rather than as comments (which are actually standalone expressions here). This closes #21142.
2018-08-15Fix error spam from loading script class iconsWill Nations
2018-08-14Add custom icons to script classes.Will Nations
2018-08-14Merge pull request #20583 from neikeq/issue-15371Rémi Verschelde
Fix case where exported properties value is lost
2018-08-13Remove usage console spamChaosus
2018-08-10Added system for GDScript warningsGeorge Marques
- Count and panel per script. - Ability to disable warnings per script using special comments. - Ability to disable warnings globally using Project Settings. - Option to treat enabled warnings as errors.
2018-07-31Allow some non-integer built-in constants in gdscriptBernhard Liebl
2018-07-29Fix case where exported properties value is lostIgnacio Etcheverry
Fixes exported property modified values lost when creating a placeholder script instance with a failed script compilation - Object set/get will call PlaceHolderScriptInstance's new fallback set/get methods as a last resort. This way, placeholder script instances can keep the values for storage or until the script is compiled successfuly. - Script::can_instance() will only return true if a real script instance can be created. Otherwise, in the case of placeholder script instances, it will return false. - Object::set_script(script) is now in charge of requesting the creation of placeholder script instances. It's no longer Script::instance_create(owner)'s duty. - PlaceHolderScriptInstance has a new method set_build_failed(bool) to determine whether it should call into its script methods or not. - Fixed a few problems during reloading of C# scripts.
2018-07-26GDScript: Fix parse error in string formattingGeorge Marques
2018-07-25GDScript: Add type inference syntax for function argumentsGeorge Marques
2018-07-25GDScript: Fix type detection for String formatting operatorGeorge Marques
2018-07-25GDScript: Fix type detection on Object typed assignGeorge Marques
Also make typed assigns a debug-only thing, so release builds are more lenient on errors.
2018-07-25GDScript: Allow accessing constants of outer classesGeorge Marques
2018-07-25GDScript: Enable built-in function introspection in non-toolsGeorge Marques
Only for debug builds. Fix problems in non-tools targets.
2018-07-25GDScript: Fix bogus error when a cursor token is found on classGeorge Marques
2018-07-25GDScript: Allow strict conversion when assigning typed variablesGeorge Marques
2018-07-25GDScript: Fix mismatching between export hint and type hintGeorge Marques
2018-07-25GDScript: Allow inherited method to add optional argumentsGeorge Marques
Also show the parent method signature in the error message.
2018-07-25GDScript: Fix returned value of get_default_argument_count()George Marques
2018-07-25GDScript: Fix main script detectionGeorge Marques
2018-07-25GDScript: Look up local scope first for detecting typeGeorge Marques
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
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.
2018-07-20Rewrite code completionGeorge Marques
- Use data type struct from the parser. - Avail from type hints when type can't be guessed. - Consider inner classes and other scripts when looking for candidates.
2018-07-20Add ability to infer variable type from assigned valueGeorge Marques
Syntax: var x : = 42 Infers the type of "x" to be an integer.
2018-07-20Add editor highlight for type-safe linesGeorge Marques
The line number is hightlighted to indicate that the line contains only type-safe code.
2018-07-20Fix line number detection in some parser nodesGeorge Marques
2018-07-20Use type hints to improve completionGeorge Marques
- Allow type hints to be completed. - Use type information to infer completion candidates. - Show typed function signature in tooltip. - Add type hints when completing declaration from virtual functions (optional).
2018-07-20Add syntax highlighting to type hintsGeorge Marques
2018-07-20Use type information to enable GDScript introspectionGeorge Marques
This makes the Script API provide accurate information when requesting property or method info.
2018-07-20Add typed instructions to GDScriptGeorge Marques
- 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.
2018-07-20Add static type checks in the parserGeorge Marques
- 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.
2018-07-20Store type hint of declared identifiersGeorge Marques
2018-07-20Move inheritance resolution to the parserGeorge Marques
2018-07-20Add typing syntaxGeorge Marques
2018-07-18Style: Format code with clang-format 6.0.1Rémi Verschelde
2018-07-15Global class names (and GDScript support for it)Juan Linietsky
2018-07-05Merge pull request #19637 from dragmz/19548Max Hilbrunner
Fix onready vars / vars accessing class members if _ready / _init not present
2018-07-04Merge pull request #18966 from chanon/new-debug-printMax Hilbrunner
Add new debug print method that shows line number where the print came from
2018-07-03Merge pull request #19828 from jjay/fix_yield_leakMax Hilbrunner
Fix memory leak in GDScript during infinnity loops with yields
2018-07-03Merge pull request #18976 from chanon/new-get-stackMax Hilbrunner
Add new get_stack function to get GDScript stack trace as array
2018-07-03Merge pull request #19251 from YeldhamDev/script_templates_changesMax Hilbrunner
Small changes to the comments in the script templates
2018-06-28Fix memory leak in GDScript during infinnity loops with yieldsYasha Borevich
2018-06-18Fix onready vars / vars accessing class members if _ready / _init not presentMarcin Zawiejski
2018-06-18Add proper type information to array propertyBojidar Marinov
Part of #19158
2018-06-13Removed duplicate default colours and removed GDScriptHighligher colours ↵Paulb23
from main editor.