summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_tokenizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GDScript: Add lambda syntax parsingGeorge Marques2021-04-281-0/+10
| | | | | | | | | | | 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")
* Fix missing quote in multiline GDScript stringAlex Hirsch2021-03-191-0/+3
| | | | fix #47117
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-281-3/+3
|
* Documentation generation for GDScriptThakee Nathees2020-11-291-2/+18
| | | | | | | | | | | | | | | | | | - 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
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Fix typos with codespellRémi Verschelde2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.17.1. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-23/+23
|
* Change GDScript compiler to use codegen abstractionGeorge Marques2020-09-011-1/+1
|
* GDScript: Check for missing exponent when parsing numbersGeorge Marques2020-09-011-0/+32
| | | | Also forbid multiple underscores in a row as numeric separator.
* GDScript: Allow keywords to be used in $ notationGeorge Marques2020-08-191-0/+46
|
* GDScript: Allow "match" to be used as an identifierGeorge Marques2020-08-171-0/+12
| | | | This is needed to call the String.match() function.
* Make all String float conversion methods be 64-bitAaron Franke2020-07-271-1/+1
|
* Wrap up GDScript 2.0 base implementationGeorge Marques2020-07-221-0/+3
|
* Reintroduce code completionGeorge Marques2020-07-201-6/+65
|
* Fix comments in beginning of fileGeorge Marques2020-07-201-2/+2
| | | | Also improve error for unknown characters.
* New GDScript tokenizer and parserGeorge Marques2020-07-201-1326/+1082
| | | | | | | | | | 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.
* Rename String bin_to_int64 to bin_to_intAaron Franke2020-06-031-1/+1
| | | | And also change String static to_int(const char *) to return int64_t
* Remove 32-bit String hex_to_int methodAaron Franke2020-06-031-1/+1
|
* Remove 32-bit String to_int methodAaron Franke2020-06-031-1/+1
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-17/+34
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-73/+0
| | | | | | | | | | | | | | 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.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-10/+30
| | | | Part of #33027.
* 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
| |