godotengine / godotengine/godot-cpp
SyntaxHighlighter cache use seems to not be possible
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
### Godot version
4.1.2-stable
### godot-cpp version
4.1
### System information
Arch linux: 6.3.2-arch1-1
### Issue description
The current godot-cpp codegen generates the following definition for _get_line_syntax_highlighting
```cpp
virtual Dictionary _get_line_syntax_highlighting(int32_t line) const;
```
In the base engine it is
```cpp
virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) { return Dictionary(); }
```
The issue I am running into is I am basing my SyntaxHighlighter implementation on the built in CodeHlighter. It caches color using a HashMap as a private member. But if _get_line_syntax_highlighting is const then we cannot modify the cache as we compute the color.
### Steps to reproduce
Generate the header files for the current 4.1 branch
### Minimal reproduction project
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.