summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_tokenizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #73226 from AThousandShips/gdscript_tok_improvementYuri Sizov2023-07-311-13/+19
|\ | | | | | | Improve GDScript identifier tokenization
| * Improvements to GDScript identifier tokenizationNinni Pipping2023-04-261-13/+19
| |
* | Merge pull request #72824 from dalexeev/gds-invalid-char-errorRémi Verschelde2023-06-191-2/+2
|\ \ | | | | | | | | | GDScript: Fix invalid character error message
| * | GDScript: Fix invalid character error messageDanil Alexeev2023-02-071-2/+2
| | |
* | | Merge pull request #73363 from dalexeev/gds-fix-min-int-not-representableRémi Verschelde2023-06-181-0/+31
|\ \ \ | | | | | | | | | | | | GDScript: Fix `MIN_INT` not representable as numeric literal
| * | | GDScript: Fix `MIN_INT` not representable as numeric literalDanil Alexeev2023-02-151-0/+31
| | | |
* | | | Merge pull request #75944 from akien-mga/style-modules-includesRémi Verschelde2023-06-151-3/+4
|\ \ \ \ | | | | | | | | | | | | | | | Style: Harmonize header includes in modules
| * | | | Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-3/+4
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* / | | GDScript: Fix repeated `_` are allowed after decimal pointDanil Alexeev2023-06-141-4/+35
|/ / /
* / / Fix for mixed tabs and spaces in gdscriptMistMage2023-04-201-1/+1
|/ /
* / GDScript: Be more lenient with identifiersGeorge Marques2023-02-091-3/+14
|/ | | | | | - Allow identifiers similar to keywords if they are in ASCII range. - Allow constants to be treated as regular identifiers. - Allow keywords that can be used as identifiers in expressions.
* Add support for Unicode identifiers in GDScriptGeorge Marques2023-01-211-12/+50
| | | | | | This is using an adapted version of UAX#31 to not rely on the ICU database (which isn't available in builds without TextServerAdvanced). It allows most characters used in diverse scripts but not everything.
* Fix parse error using Vector{2,3,4}.INFAdam Scott2023-01-081-0/+1
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-9/+9
| | | | change warnings=all to use /W4.
* Implement exponential operator (**) to GDScript/ExpressionsYuri Roubinsky2022-05-111-0/+10
|
* improve OS.get_name classref, misc/scripts fixes, remove trailing quoteNathan Franke2022-04-221-1/+1
|
* Cleanup and move char functions to the `char_utils.h` header.bruvzg2022-02-041-33/+17
|
* Add support for the escaped UTF-16 and UTF-32 Unicode characters in the ↵bruvzg2022-01-301-3/+63
| | | | scripts and expressions.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* [GDScript] Check string literals for Unicode direction control characters.bruvzg2021-11-111-0/+9
|
* Improve GDScript indentation error messageMax Hilbrunner2021-10-281-1/+8
|
* Reorganise text editor settingsPaulb232021-08-161-1/+1
|
* Merge pull request #46714 from HaSa1002/fix-gdscript-underscore-strictRémi Verschelde2021-05-061-0/+4
|\ | | | | Fix GDScript Tokenizer being very strict about the number of underscores
| * Fix GDScript Tokenizer being very strict about the number of underscoresJohannes2021-03-061-0/+4
| | | | | | | | | | You can use multiple underscores in one number, just not two of them together.
* | 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.