-
Notifications
You must be signed in to change notification settings - Fork 12
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
Changes and fixes to grammar: Number literals, preprocessor, string #57
Open
akberg
wants to merge
6
commits into
racz16:master
Choose a base branch
from
akberg:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+10
−4
Conversation
This file contains 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
The regex was not properly catching hex numbers. Modified the regex to be more comprehensive and fix the issue. Signed-off-by: Andreas K. Berg <andreaskb98@gmail.com>
There are extensions that add support for file includes in GLSL. Not sure about the extent to which those are used or available in ES, but including the rule makes the extension more accessible for a larger audience. Signed-off-by: Andreas K. Berg <andreaskb98@gmail.com>
Added the defined preprocessor keywords (+include, see previous commit for suggestion), instead of whatever kind of black magic that was blocking theming of directive parameters. Now, only a valid preprocessor keyword will be highlighted, and any literals or symbols behind it will also be properly highlighted. Also changed the scope name to hit better with common themes (Tested with Microsoft themes, which colour preprocessor directives differently, as well as with variants of Atom and Material and others). Signed-off-by: Andreas K. Berg <andreaskb98@gmail.com>
Signed-off-by: Andreas K. Berg <andreaskb98@gmail.com>
Fixed error introduced in previous commit. Signed-off-by: Andreas K. Berg <andreaskb98@gmail.com>
Signed-off-by: Andreas K. Berg <andreaskb98@gmail.com>
@akberg, will you continue to work on this Pull request? |
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.
I've been searching hopelessly for a remotely useful GLSL language support for VSCode for a while, and this one immediately seems to provide a mostly decent highlighting. I did however notice a few misses, that need fixing -- and added an extra which is open for discussion:
GL_GOOGLE_include_directive
) provide the include directive for including files and reusing code. For this, I've added theinclude
keyword to the preprocessor list, and a rule for double-quoted strings. I'm not using GLES though, just GL, so I don't know how available those extensions are for ES. In any case, supporting the highlighting would make the extension more accessible, given that this is pretty much the only useful syntax highlighter on the marketplace.