ErichDonGubler / moz-webgpu-cts

An extremely fast (but opinionated) tool for working with WPT metadata while developing an implementation of WebGPU in a web browser.
Apache License 2.0
0 stars 2 forks source link

Diagnostics for metadata parsing is pretty bad! #30

Open ErichDonGubler opened 9 months ago

ErichDonGubler commented 9 months ago

Right now, diagnostics are pretty bad. TODO: show examples, they're pretty easy to make, like with parens, empty intermittents, etc.

Current leads to fix this:

ErichDonGubler commented 9 months ago

A relevant chumsky upstream discussion: https://github.com/zesterer/chumsky/discussions/522

GitHub
Fail parser immediately (skip other choices) · zesterer/chumsky · Discussion #522
Let's say that I have this parser: it either parses a function definition or an expression. let fn_ = keyword("fn").padded() .ignore_then(ident_) .then(args) .then(fn_body); choice(( fn_, expr, )) ...