summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/editor/gdscript_highlighter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-8/+8
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-19/+17
|
* Optimize StringName usagereduz2021-07-181-1/+1
| | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Highlight annotations in the GDScript syntax highlighterHugo Locurcio2021-06-061-3/+21
| | | | | By default, a orange color is used to highlight annotations in the script editor.
* Rename the bundled text editor themes for consistency with themesHugo Locurcio2021-05-311-2/+2
| | | | | | | | | | | | | The Adaptive text editor theme is the default, and has therefore been renamed Default for consistency with the Default theme preset. It keeps its automatic dark/light switch status. The Default text editor theme was actually a legacy Godot 2-style theme, so it has been renamed to Godot 2 to match the theme preset. Its background color has been changed to be a constant opaque color, since the new editor theme made the theme look less good on a translucent background. The previous background color on light theme also lacked contrast.
* Highlight control flow keywords with a different colorHugo Locurcio2021-05-051-1/+6
| | | | This makes them easier to distinguish from other keywords.
* Fix highlight color for class attributes that are also keywordsLucas Van Mol2021-01-261-6/+8
|
* 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 🎆
* Switch from recursion to iterative for backfilling colour regionsPaulb232020-10-031-0/+7
|
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-5/+5
|
* Fix color region end key seach and start key orderPaulb232020-08-221-13/+17
|
* Fix colour region continuation over blank lines, issue 41120Paulb232020-08-081-0/+4
|
* New GDScript tokenizer and parserGeorge Marques2020-07-201-2/+2
| | | | | | | | | | 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.
* Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighterPaulb232020-07-111-79/+272
| | | | | | | | - Extacted all syntax highlighting code from text edit - Removed enable syntax highlighting from text edit - Added line_edited_from signal to text_edit - Renamed get/set_syntax_highlighting to get/set_syntax_highlighter - Added EditorSyntaxHighligher
* Expose Syntax highlighter for editor pluginsPaulb232020-07-111-2/+4
|
* Convert syntax highlighters into a resourcePaulb232020-07-111-33/+32
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-1/+2
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-6/+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.
* Popups are now windows also (broken!)Juan Linietsky2020-03-261-5/+5
|
* 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.
* Tweak the default function definition color when using a dark themeHugo Locurcio2019-10-021-10/+18
| | | | | This decreases its saturation to make it less visually jarring. The code was also refactored for clarity and to avoid repetition.
* Highlight singletons and class_names in GDScriptBojidar Marinov2019-09-281-1/+1
| | | | | Also, implement a small QoL change for auto-typed variables. Closes #5739
* Use base `Color()` constructors instead of `Color::html()`Hugo Locurcio2019-07-081-2/+2
| | | | | This results in slightly smaller binaries (-17 KB for an editor binary) as no strings need to be allocated.
* Merge pull request #28416 from JellyWX/binary-literalsRémi Verschelde2019-05-291-1/+18
|\ | | | | Support for binary literals in GDScript
| * Support for binary literals in GDScript. Added an error that shows if a ↵jude-lafitteIII2019-04-251-1/+18
| | | | | | | | point is written in a hex literal. Added highlighting for binary literals in GDScript
* | added a const keyword for a methods that return constant literal...hbina0852019-05-211-1/+1
|/
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix types highlighting outside of function args and var declarations, issues ↵Paulb232018-10-131-4/+14
| | | | 22029,21638
* Fix warning about functions defined but not used [-Wunused-function]Rémi Verschelde2018-09-291-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 5 warnings: ``` core/io/zip_io.h:128:26: warning: 'zlib_filefunc_def zipio_create_io_from_file(FileAccess**)' defined but not used [-Wunused-function] core/script_debugger_remote.cpp:110:17: warning: 'ObjectID safe_get_instance_id(const Variant&)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:103:12: warning: 'int _socket_create(IP::Type&, int, int)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:45:15: warning: 'size_t _set_sockaddr(sockaddr_storage*, const IP_Address&, int, IP::Type)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:76:15: warning: 'size_t _set_listen_sockaddr(sockaddr_storage*, int, IP::Type, IP_Address)' defined but not used [-Wunused-function] editor/editor_fonts.cpp:40:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function] editor/editor_themes.cpp:85:26: warning: 'Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat>, Color)' defined but not used [-Wunused-function] editor/import/editor_import_collada.cpp:493:13: warning: 'void _generate_normals(const PoolVector<int>&, const PoolVector<Vector3>&, PoolVector<Vector3>&)' defined but not used [-Wunused-function] editor/import/editor_import_collada.cpp:524:13: warning: 'void _generate_tangents_and_binormals(const PoolVector<int>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, PoolVector<float>&)' defined but not used [-Wunused-function] editor/pvrtc_compress.cpp:118:13: warning: 'void _compress_etc(Image*)' defined but not used [-Wunused-function] modules/etc/image_etc.cpp:89:13: warning: 'void _decompress_etc1(Image*)' defined but not used [-Wunused-function] modules/etc/image_etc.cpp:93:13: warning: 'void _decompress_etc2(Image*)' defined but not used [-Wunused-function] modules/gdscript/editor/gdscript_highlighter.cpp:46:13: warning: 'bool _is_whitespace(CharType)' defined but not used [-Wunused-function] scene/2d/cpu_particles_2d.cpp:510:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function] scene/3d/cpu_particles.cpp:474:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function] scene/resources/default_theme/default_theme.cpp:123:20: warning: 'Ref<Shader> make_shader(const char*, const char*, const char*)' defined but not used [-Wunused-function] scene/resources/default_theme/default_theme.cpp:130:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function] ``` Had to split `core/io/zip_io.h` into header and .cpp file without 'static' keyword. Not fixed yet (static definition in header used in some files but not all): ``` modules/websocket/lws_helper.h:111:13: warning: 'void _lws_make_protocols(void*, int (*)(lws*, lws_callback_reasons, void*, void*, size_t), PoolVector<String>, _LWSRef**)' defined but not used [-Wunused-function] ``` Also fixed a couple other warnings missed in previous commits.
* Fixed scientific notaion not highlighting correctly, issue 21435Paulb232018-09-081-2/+2
|
* Add syntax highlighting to type hintsGeorge Marques2018-07-201-0/+30
|
* Removed duplicate default colours and removed GDScriptHighligher colours ↵Paulb232018-06-131-2/+18
| | | | from main editor.
* Added GDScript NodePath highlightingPaulb232018-04-201-1/+12
|
* Added GDScript function definition highlightingPaulb232018-04-201-1/+10
|
* GDScript highlighter now remembers previous statePaulb232018-04-201-6/+45
|
* Exclude GDScriptSyntaxHighlighter from non-tool buildsPaulb232018-04-201-0/+262