[webkit-changes] [WebKit/WebKit] 9ee0c4: [WGSL] Use a SortedArrayMap to match keywords and ...
Dan Glastonbury
noreply at github.com
Wed Feb 15 17:40:12 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9ee0c4ea8853a3017f9a45c06ea1adda18be6b05
https://github.com/WebKit/WebKit/commit/9ee0c4ea8853a3017f9a45c06ea1adda18be6b05
Author: Dan Glastonbury <djg at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebGPU/WGSL/Lexer.cpp
Log Message:
-----------
[WGSL] Use a SortedArrayMap to match keywords and reserved words
https://bugs.webkit.org/show_bug.cgi?id=252278
rdar://problem/105476092
Reviewed by Tadeu Zagallo.
In lieu of a tool to generate a trie for detecting keywords and reserved words,
replace the long sequence of if/return with a SortedArrayMap of keyword to
TokenType.
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
Canonical link: https://commits.webkit.org/260336@main
More information about the webkit-changes
mailing list