[webkit-changes] [WebKit/WebKit] a359a2: [WGSL] Handle parsing of short-circuit expression.

Dan Glastonbury noreply at github.com
Tue Feb 14 21:00:39 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a359a25937a0810886dc077d334c17323d2e29c6
      https://github.com/WebKit/WebKit/commit/a359a25937a0810886dc077d334c17323d2e29c6
  Author: Dan Glastonbury <djg at apple.com>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    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] Handle parsing of short-circuit expression.
https://bugs.webkit.org/show_bug.cgi?id=252274
rdar://problem/105473640

Reviewed by Myles C. Maxfield.

Implement parsing of expressions involving && and || according to the WGSL spec.

* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::canContinueShortCircuitAndExpression):
(WGSL::canContinueShortCircuitOrExpression):
(WGSL::toBinaryOperation):
(WGSL::Parser<Lexer>::parseShortCircuitExpression):
(WGSL::Parser<Lexer>::parseRelationalExpression):
(WGSL::Parser<Lexer>::parseExpression):
* Source/WebGPU/WGSL/ParserPrivate.h:
* Source/WebGPU/WGSL/Token.cpp:
(WGSL::toString):
* Source/WebGPU/WGSL/Token.h:
* Tools/TestWebKitAPI/Tests/WGSL/LexerTests.cpp:
(TestWGSLAPI::TEST):

Canonical link: https://commits.webkit.org/260293@main




More information about the webkit-changes mailing list