Bug 245859 - [WGSL] Don't parse literals in lexer
Summary: [WGSL] Don't parse literals in lexer
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-29 19:26 PDT by Dan Glastonbury
Modified: 2022-09-29 19:26 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Glastonbury 2022-09-29 19:26:08 PDT
WGSL current parses numeric literals during lexical analysis into `double`s. This might be fine for 32-bit integers but isn't sufficient if WGSL adds 64-bit integers.

We should instead pattern match on the format for numeric literals, classify them and defer the validation of literals to a later pass after type checking has been performed. This also requires handling of half floats.
Comment 1 Radar WebKit Bug Importer 2022-09-29 19:26:47 PDT
<rdar://problem/100592948>