-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDScript: Add tests for highlighter #88910
base: master
Are you sure you want to change the base?
Conversation
dalexeev
commented
Feb 27, 2024
- Closes No unit tests for GDScript code highlighter #88887.
6524e2a
to
23509fb
Compare
23509fb
to
57b86a2
Compare
0002 | ||
>>>> | ||
0003 class InnerClass extends RefCounted: pass | ||
>>>> Kw SN SKw SEt S Cf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yyyyyeah, we need to discuss this somewhere. The arbitrary character count for each identifier is very prone to confusion and hard to decipher. At the same time, so would be using a single character.
I think this system would greatly benefit from the ability to define highlighter placeholders for each individual test, but I have absolutely no idea on how to go about that. |
There's an alternative approach I'd like to propose. Instead of printing the highlighting per-line, it could be printed for each type of highlighting. As a silly mockup based on the PR's test:
|
Assuming my PR is added, here's some ideas for tests of StringName/&&/&. I don't have experience in this area though. # & should be symbol colored.
true \
&& true
1 \
& 4
& "error" # If your test allows errors.
# & next to quote should be StringName colored, unless it is exactly '&&""'.
var sname := &''+&""
sname&&&""
sname&&"" |