Fix a bug that causes syntax to not highlight correctly in editor.#21
Open
zxq5-dev wants to merge 2 commits intop4ymak:mainfrom
Open
Fix a bug that causes syntax to not highlight correctly in editor.#21zxq5-dev wants to merge 2 commits intop4ymak:mainfrom
zxq5-dev wants to merge 2 commits intop4ymak:mainfrom
Conversation
changed from upper case to lowercase to fix a bug where syntax is not highlighted correctly. will also need to change special vals to lowercase in another file
lowercased register names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
while trying to setup syntax highlighting for an additional programming language for one of my own projects, I noticed that some symbols were not being highlighted correctly (such as keywords and variables)
the solution ended up being to replace the .to_ascii_uppercase() methods to their lowercase equivalent in src/syntax/mod.rs, as in the inbuilt languages most of the keywords are defined in lowercase, meaning many tokens would not match due to the difference in case.
the bug didn't seem to affect the normal programming languages much but was quite noticeable for assembly.
before fix:


after fix:

