Skip to content
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

Test that tokenization does not tokenize >= into a single token #34

Closed

Conversation

stefnotch
Copy link
Contributor

I found a bug in the current parser :D
The tokenization turns >= into a single token, but the template parsing expects to be able to yoink the > from the >=

@mighdoll
Copy link
Contributor

mighdoll commented Nov 6, 2024

Perhaps the tokens() combinator.. to give the template parser separate tokenization

@mighdoll
Copy link
Contributor

mighdoll commented Jan 9, 2025

I think this is fixed in the current grammar (which uses a separate tokenizer to recognize brackets)..

@stefnotch
Copy link
Contributor Author

We should still have a unit test like that. I'll make sure that this PR gets updated, and that it also includes the test case from
gfx-rs/wgpu#6898

(Turns out that even wgpu sometimes struggles with those templates)

@stefnotch stefnotch closed this Feb 8, 2025
@stefnotch
Copy link
Contributor Author

We have test("var foo: vec2<f32 >= vec2( 0.5, -0.5);", ctx => { in ParseWESL.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants