[webkit-changes] [WebKit/WebKit] 25fd3e: [WGSL] i32, u32, f32 and bool should not be keywords
Tadeu Zagallo
noreply at github.com
Mon Aug 28 01:39:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 25fd3e2899f5294574f10bd00cdb4005f77d76ea
https://github.com/WebKit/WebKit/commit/25fd3e2899f5294574f10bd00cdb4005f77d76ea
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-08-28 (Mon, 28 Aug 2023)
Changed paths:
M Source/WebGPU/WGSL/Lexer.cpp
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/Token.cpp
M Source/WebGPU/WGSL/Token.h
M Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp
Log Message:
-----------
[WGSL] i32, u32, f32 and bool should not be keywords
https://bugs.webkit.org/show_bug.cgi?id=260609
rdar://114320714
Reviewed by Dan Glastonbury.
The first of a series of patches to simplify things as the AST should not be aware
of what is or isn't a type. This starts by simply removing the keywords for the
primitive types, which were barely used to begin with: the lexer transformed the
identifier into a keyword, but the parser turned it back into an identifier.
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseTypeName):
(WGSL::Parser<Lexer>::parsePrimaryExpression):
* Source/WebGPU/WGSL/Token.cpp:
(WGSL::toString):
* Source/WebGPU/WGSL/Token.h:
Canonical link: https://commits.webkit.org/267346@main
More information about the webkit-changes
mailing list