summaryrefslogtreecommitdiff
path: root/modules/gdscript/editor/gdscript_highlighter.cpp
AgeCommit message (Collapse)Author
2022-11-14Remove redundant Variant-types initializationsMarkus Sauermann
2022-10-18Unify usage of GLOBAL/EDITOR_GETkobewi
2022-10-11GDScript: fix highlighting '.' after global class nameRune
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-10-02Fix more highlighting bugsVolTer
2022-09-27Merge pull request #65074 from MewPurPur/booleans-highlighting-fixRémi Verschelde
Fix highlighting after value keywords
2022-08-31Fixed a case for global function highlightingVolTer
2022-08-31Add missing values to binary operator highlighter check exceptionsVolTer
2022-08-29Follow-up fixes to number highlightingVolTer
2022-08-29Fix number highlightingVolTer
2022-08-27Merge pull request #64651 from MewPurPur/fix-globalfunc-highlightingRémi Verschelde
Add new highlighting color for `@GDScript` and `@GlobalScope` functions
2022-08-25Added highlighting color for GDScript and GlobalScope functionsVolTer
2022-08-25Tweaked StringName highlighting colorVolTer
2022-08-22Replace Array return types with TypedArraykobewi
2022-08-19Merge pull request #63326 from MewPurPur/binary-highlighting-fixMax Hilbrunner
Fix highlighting of multiple operators
2022-08-14Improve binary operator highlightingVolTer
2022-07-31Improve script editor's light theme syntax colors for better readabilityHugo Locurcio
New colors were hand-picked to have a better contrast rate, while still following the general coloring of the previous light theme. This improves the light theme's accessibility, especially in outdoor environments with direct sunlight.
2022-07-19Highlight ^NodePath and &StringName differentlykobewi
2022-05-27GDScript: Support `%` in shorthand for `get_node`George Marques
The `%` is used in scene unique nodes. Now `%` can also be used instead of `$` for the shorthand, besides being allowed generally anywhere in the path as the prefix for a node name.
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg
2022-02-04String: Add contains().Anilforextra
2022-01-15Improvments for SyntaxHighlightersPaulb23
- Fix immedate Funcion in lamba highlight - Highlight signals as one colour - Highlight node paths as one colour - Highlight escape chars in strings
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-09-21Improve GDScript Editor and Improve latencyGordon MacPherson
Improvements: - GDScript Highlighter is faster by 25% as keys are smaller (hashes instead of strings) - Removes message queue from _apply_settings_change to allow resize to work correctly - Some performance fixes are pending still Note: this resolves the code editor behaving badly when resizing in debug builds
2021-08-26Use OrderedHashMap for autoloads to preserve orderLyuma
2021-08-22Replace BIND_VMETHOD by new GDVIRTUAL syntaxreduz
* New syntax is type safe. * New syntax allows for type safe virtuals in native extensions. * New syntax permits extremely fast calling. Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`. These will require API rework on a separate PR as they work different than the rest of the functions. Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-17Remove underscore hacksMax Hilbrunner
Way less cruft. :) Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-08-16Reorganise text editor settingsPaulb23
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-18Optimize StringName usagereduz
* 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.
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-06Highlight annotations in the GDScript syntax highlighterHugo Locurcio
By default, a orange color is used to highlight annotations in the script editor.
2021-05-31Rename the bundled text editor themes for consistency with themesHugo Locurcio
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.
2021-05-05Highlight control flow keywords with a different colorHugo Locurcio
This makes them easier to distinguish from other keywords.
2021-01-26Fix highlight color for class attributes that are also keywordsLucas Van Mol
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-10-03Switch from recursion to iterative for backfilling colour regionsPaulb23
2020-09-03[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg
2020-08-22Fix color region end key seach and start key orderPaulb23
2020-08-08Fix colour region continuation over blank lines, issue 41120Paulb23
2020-07-20New GDScript tokenizer and parserGeorge Marques
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.
2020-07-11Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighterPaulb23
- 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
2020-07-11Expose Syntax highlighter for editor pluginsPaulb23
2020-07-11Convert syntax highlighters into a resourcePaulb23
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.