summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_tokenizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #37033 from ThakeeNathees/python-like-str-escapeRémi Verschelde2020-05-091-11/+13
|\ | | | | python like string escape implemented
| * python like string escape implementedThakee Nathees2020-03-151-11/+13
| |
* | Replace NULL with nullptrlupoDharkael2020-04-021-5/+5
|/
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-3/+5
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* Merge pull request #36461 from akien-mga/c++17-fallthrough-attributeRémi Verschelde2020-02-231-3/+3
|\ | | | | Replace FALLTHROUGH macro by C++17 [[fallthrough]]
| * Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde2020-02-231-3/+3
| | | | | | | | | | | | | | | | | | | | This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
* | Add support for Vector2i, Rect2i and Vector3i to VariantJuan Linietsky2020-02-221-0/+3
|/ | | | | | | WARNING: Requires C++17 'guaranteed copy elision' to fix ambiguous operator problems in Variant. This was added for this commit (and future C++17 uses) in #36457.
* Added StringName as a variant type.Juan Linietsky2020-02-211-4/+5
| | | | Also changed all relevant properties defined manually to StringName.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-0/+2
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-7/+7
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Remove more deprecated methods and codeRémi Verschelde2020-02-131-1/+1
|
* Remove deprecated sync and slave networking keywordsRémi Verschelde2020-02-131-6/+1
| | | | | | Those keywords were deprecated for 3.1 in #22087. Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
* 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.
* Merge pull request #32966 from ffaristocrat/fix-hex-parsingRémi Verschelde2019-11-121-3/+4
|\ | | | | Fix base 16 hex literal parsing
| * Fixes #32963 by correctly parsing bin/hex literalsMicheál Keane2019-11-121-3/+4
| |
* | Merge pull request #32808 from bojidar-bg/30937-less-strict-mixed-spacingRémi Verschelde2019-10-251-44/+27
|\ \ | | | | | | Allow mixed tabs and spaces when indentation does not depend on tab size
| * | Allow mixed tabs and spaces when indentation does not depend on tab sizeBojidar Marinov2019-10-251-44/+27
| |/ | | | | | | (hopefully) Closes #30937, fixes #32612
* / Remove duplicate valid value check in gdscript_tokenizer.cpp.Marcel Admiraal2019-10-181-7/+3
|/
* Added some obvious errors explanationsqarmin2019-09-251-1/+1
|
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-091-6/+3
| | | | "modules/gdnative", "modules/gdscript" directories.
* Disallow using of both tabs and spaces for indentation in the same fileBojidar Marinov2019-07-261-2/+34
| | | | Closes #7898
* Some code changed with Clang-Tidyqarmin2019-06-261-2/+2
|
* Support for binary literals in GDScript. Added an error that shows if a ↵jude-lafitteIII2019-04-251-2/+25
| | | | point is written in a hex literal. Added highlighting for binary literals in GDScript
* Merge pull request #27673 from qarmin/small_fixesRémi Verschelde2019-04-221-1/+1
|\ | | | | Small fixes, mostly duplicated code
| * Small fixes, mostly dupicated codeqarmin2019-04-081-1/+1
| |
* | Merge pull request #27170 from ↵Rémi Verschelde2019-04-101-5/+6
|\ \ | | | | | | | | | | | | timoschwarzer/allow-whitespaces-in-warning-ignore-comments Allow whitespaces in warning-ignore comments
| * | Allow whitespaces in warning-ignore commentsTimo Schwarzer2019-03-171-5/+6
| | |
* | | Style: Apply new changes from clang-format 8.0Rémi Verschelde2019-04-091-2/+4
| | | | | | | | | | | | | | | | | | It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
* | | Fix -Wimplicit-fallthrough warnings from GCC 8Rémi Verschelde2019-04-051-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional. Can be replaced by `[[fallthrough]]` if/when we switch to C++17. The warning is now enabled by default for GCC on `extra` warnings level (part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet, but we could enable it manually once we switch to C++11. There's no equivalent feature in MSVC for now. Fixes #26135.
* | Add object encoding param to serialization methodsFabio Alessandrelli2019-04-011-3/+5
|/ | | | | | | | | Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
* Fix -Wsign-compare warnings.marxin2019-02-271-2/+2
| | | | | I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
* Fix all -Wtype-limits warnings.marxin2019-02-211-2/+2
|
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-3/+3
| | | | Fixes #25316.
* GDScript: Remove unused `switch`, `case` and `do` CF keywordsRémi Verschelde2019-02-201-9/+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.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* GDScriptTokenizer: Fix token_names orderlupoDharkael2018-10-141-1/+1
|
* Rename slave keyword to puppetFabio Alessandrelli2018-09-151-4/+6
| | | | | The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+3
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-1/+0
|
* Added system for GDScript warningsGeorge Marques2018-08-101-1/+20
| | | | | | | - 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.
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-16/+16
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Add typing syntaxGeorge Marques2018-07-201-4/+7
|
* 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-1/+3
|
* New sync keywords in GDScript, NativeScript, MonoFabio Alessandrelli2018-05-291-0/+9
|
* Revert "RPCMode refactor, more sync modes"Max Hilbrunner2018-05-291-9/+0
|
* New sync keywords in GDScript, NativeScript, MonoFabio Alessandrelli2018-05-261-0/+9
|
* 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!
* Rename Rect3 to AABB.Ferenc Arn2017-11-171-5/+5
| | | | Fixes #12973.