-
Notifications
You must be signed in to change notification settings - Fork 943
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[naga wgsl-in] Introduce
Word
enum, for classifying identifiers.
Change `Token::Word`'s payload from a `&str` to a `front::wgsl::parse::word::Word` enum, with variants for words reserved by the WGSL grammar like `struct`, `loop`, and so on. Rather than doing string comparisons in `match` statements, hash word-like tokens once at lexing time, and then let the parser's `match` statements compare enum variants.
- Loading branch information
Showing
4 changed files
with
190 additions
and
100 deletions.
There are no files selected for viewing
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
Oops, something went wrong.