[webkit-changes] [WebKit/WebKit] d2179e: [WGSL] Implement if statement parsing
Dan Glastonbury
noreply at github.com
Mon Apr 10 19:45:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d2179ea70ad3c25160a5f3ce74df6607898c5239
https://github.com/WebKit/WebKit/commit/d2179ea70ad3c25160a5f3ce74df6607898c5239
Author: Dan Glastonbury <djg at apple.com>
Date: 2023-04-10 (Mon, 10 Apr 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTIfStatement.h
M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
M Source/WebGPU/WGSL/Lexer.cpp
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/ParserPrivate.h
M Source/WebGPU/WGSL/Token.cpp
M Source/WebGPU/WGSL/Token.h
M Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp
M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp
Log Message:
-----------
[WGSL] Implement if statement parsing
https://bugs.webkit.org/show_bug.cgi?id=255183
rdar://problem/107775701
Reviewed by Tadeu Zagallo.
Handle the parsing of if statements following the WGSL spec. Attributes attached
to if statements aren't handled and will be implemented in a future change.
* Source/WebGPU/WGSL/AST/ASTIfStatement.h:
* Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
(WGSL::AST::Visitor::visit):
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseStatement):
(WGSL::Parser<Lexer>::parseIfStatement):
(WGSL::Parser<Lexer>::parseIfStatementWithAttributes):
* Source/WebGPU/WGSL/ParserPrivate.h:
* Source/WebGPU/WGSL/Token.cpp:
(WGSL::toString):
* Source/WebGPU/WGSL/Token.h:
* Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp:
(TestWGSLAPI::checkSingleToken):
(TestWGSLAPI::TEST):
* Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp:
(TestWGSLAPI::TEST):
Canonical link: https://commits.webkit.org/262802@main
More information about the webkit-changes
mailing list