Commit Graph

86 Commits

Author SHA1 Message Date
Rémi Verschelde a8cfd1436a
Merge pull request #86176 from dalexeev/gds-fix-type-highlighting
GDScript: Fix type highlighting
2024-01-30 17:47:33 +01:00
Danil Alexeev faebb0895f
GDScript: Highlight code region comments 2024-01-25 22:03:48 +03:00
Yuri Sizov 45eedba1fa Improve editor theme generation after the refactor 2024-01-17 15:16:53 +01:00
Danil Alexeev 3a4a0c6b15
GDScript: Fix type highlighting 2023-12-14 23:38:24 +03:00
Thaddeus Crews 5cf0d772bc
Change container_element_type to vector container 2023-12-05 08:51:49 -06:00
Danil Alexeev 881fe67d94
Code Editor: Fix regression with using doc comments for code regions 2023-10-13 09:38:03 +03:00
Danil Alexeev de7cbe8789
Highlight doc comments in a different color 2023-10-08 19:26:10 +03:00
Rémi Verschelde 1edf0f35b1
Merge pull request #82326 from adeneve/gdscript_dict_highlighter_fix
Fix for GDScriptHighlighter dictionaries as function arguments
2023-10-05 22:49:47 +02:00
Andrew de Neve 978fcaf1b4 Fix for gdscript_highlighter dictionaries as arguments
Fix for gdscript_highlighter. When passing a dictionary
as a function argument, the dictionary values were being
highlighted green as if they were types.
2023-10-05 12:38:39 -07:00
Danil Alexeev e750c59cf8
GDScript: Improve highlighting of types 2023-10-03 17:32:27 +03:00
Danil Alexeev 2964c7d51c
GDScript: Add raw string literals (r-strings) 2023-09-11 18:34:33 +03:00
MewPurPur d3946242f4 Fix highlighting of hex numbers with separators 2023-08-28 09:52:40 +03:00
Danil Alexeev 54231682ba
GDScript: Highlight comment markers (`TODO`, `FIXME`, etc.) 2023-08-07 11:33:51 +03:00
Rémi Verschelde 25b2f1780a
Style: Harmonize header includes in modules
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
2023-06-15 14:35:45 +02:00
VolTer 952703d921 Make GDScript number highlighting stricter 2023-03-01 21:27:32 +01:00
Haoyu Qiu 5a283bdbcd Allow unicode identifier in GDScript syntax highlighter 2023-01-29 13:17:05 +08:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
VolTer 52cfd4551d Stop highlighting node refs if they are invalid identifiers 2023-01-03 16:00:16 +02:00
Markus Sauermann 3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Rune 624af7e032 GDScript: fix highlighting '.' after global class name 2022-10-11 22:18:19 -07:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
VolTer 2d48bf0b88 Fix more highlighting bugs 2022-10-02 17:44:39 +02:00
Rémi Verschelde cb39d7d08b Merge pull request #65074 from MewPurPur/booleans-highlighting-fix
Fix highlighting after value keywords
2022-09-27 09:58:58 +02:00
VolTer 54bb9c3dd5 Fixed a case for global function highlighting 2022-08-31 23:12:23 +02:00
VolTer ff362f8586 Add missing values to binary operator highlighter check exceptions 2022-08-31 08:51:26 +02:00
VolTer 1342b8ccd6 Follow-up fixes to number highlighting 2022-08-29 20:54:56 +02:00
VolTer a33ed6c046 Fix number highlighting 2022-08-29 11:35:46 +02:00
Rémi Verschelde 09086b0bb0
Merge pull request #64651 from MewPurPur/fix-globalfunc-highlighting
Add new highlighting color for `@GDScript` and `@GlobalScope` functions
2022-08-27 18:44:14 +02:00
VolTer 88ad758b41 Added highlighting color for GDScript and GlobalScope functions 2022-08-25 17:00:16 +02:00
VolTer 73bbc61eb4 Tweaked StringName highlighting color 2022-08-25 08:32:14 +02:00
kobewi 8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Max Hilbrunner 6f273d2156
Merge pull request #63326 from MewPurPur/binary-highlighting-fix
Fix highlighting of multiple operators
2022-08-19 01:27:02 +02:00
VolTer 2e6108d181 Improve binary operator highlighting 2022-08-14 15:49:07 +02:00
Hugo Locurcio 0a24d40836
Improve script editor's light theme syntax colors for better readability
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-31 23:40:48 +02:00
kobewi df5655fdca Highlight ^NodePath and &StringName differently 2022-07-19 20:20:30 +02:00
George Marques eba3e0a9fc
GDScript: Support `%` in shorthand for `get_node`
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-27 13:46:18 -03:00
reduz 8b7c7f5a75 Add a new HashMap implementation
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-05-12 11:21:29 +02:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
bruvzg 244db37508
Cleanup and move char functions to the `char_utils.h` header. 2022-02-04 11:35:01 +02:00
Anilforextra adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Paulb23 fffeecfd68 Improvments for SyntaxHighlighters
- Fix immedate Funcion in lamba highlight
- Highlight signals as one colour
- Highlight node paths as one colour
- Highlight escape chars in strings
2022-01-15 15:39:55 +00:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Nathan Franke 49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Gordon MacPherson 1881b3adc5
Improve GDScript Editor and Improve latency
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-09-21 13:56:47 +02:00
Lyuma 31f790299c Use OrderedHashMap for autoloads to preserve order 2021-08-26 21:55:26 -07:00
reduz 3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* 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-22 08:23:58 -03:00
Max Hilbrunner 5161c97c9c Remove underscore hacks
Way less cruft. :)

Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-08-17 16:10:28 +02:00
Paulb23 bcfc591f86 Reorganise text editor settings 2021-08-16 17:18:49 +01:00
Rémi Verschelde ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00