Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8df3beb4ce3657173519fa4a87d1ff4db910e608
https://github.com/WebKit/WebKit/commit/8df3beb4ce3657173519fa4a87d1ff4db910e608
Author: Dan Glastonbury <[email protected]>
Date: 2023-04-07 (Fri, 07 Apr 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] Distinguish between abstract and concrete float literals
https://bugs.webkit.org/show_bug.cgi?id=255127
rdar://problem/107732951
Reviewed by Tadeu Zagallo.
Lexing did not correctly distinguish between "abstract" and "concrete" floating
point literals. Eg. 124.0 vs 124.0f. This patch implements the distinction via
tokens AbstractFloatLiteral and FloatLiteral, allowing the parser to create
Float32Literal AST nodes.
Also, not all cases of concrete literals specified with suffix 'f' were lexed
correctly. Added these cases and tests.
Canonical link: https://commits.webkit.org/262732@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes