Skip to content

Added Wgsl keywords and identifiers#26

Open
Zelif wants to merge 1 commit intosantaclose:masterfrom
Zelif:add-Wgsl-language-highlighting
Open

Added Wgsl keywords and identifiers#26
Zelif wants to merge 1 commit intosantaclose:masterfrom
Zelif:add-Wgsl-language-highlighting

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants