Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added Wgsl keywords and identifiers #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zelif
Copy link

@Zelif Zelif commented Jul 5, 2024

Adding WGSL highlighting support:
#25
WGSL Spec

This still needs work, I haven't touched the regex's below (taken from the GLSL section, feel free to remove the comments; I had added them to keep track of what I was adding.

What PaletteIndex would attributes fall under? (ive added it to keywords for now)

@vertex
fn vertex_main_function(@builtin(position) coord: vec4<f32>) {
    // ....
}

Editor_2024-07-05_15-36-46

@Zelif
Copy link
Author

Zelif commented Jul 5, 2024

Unsure how to handle the <TYPE>
Updated most of the regex's that were inside the WGSL spec (unsure if they are any good)
There are duplicates in keywords and identifiers, unsure what ones to put them in.
I am sure this can be improved by A LOT, but hopefully is a start.
Ended up with:
Editor_2024-07-05_19-47-05

@santaclose
Copy link
Owner

thank you for the PR. Can you squash the commits?

Added Keywords and Identifiers for WGSL
Added regex for float, half, int, unsigned int and hex number for wgsl
@Zelif Zelif force-pushed the add-Wgsl-language-highlighting branch from cfb73ae to 57ac78d Compare July 7, 2024 04:19
@Zelif Zelif marked this pull request as ready for review July 7, 2024 04:20
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants