Ben Clayton 786bc92002 wsgl parser: Add expect_block(), use it
`expect_block()` takes a start and end token, along with a function to parse a lexical block body.

This reduces code, keeps error messages consistent, and also gives us a future place to try resynchronising the parser so we can have more than one error emitted.

`expect_paren_block()` and `expect_brace_block()` are convenience helpers for providing the start and end tokens for common block types.

Bug: tint:282
Change-Id: I432a0301727b131a6fce875687b952dfc6889a4b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31736
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-04 20:08:51 +00:00
..
2020-03-27 00:47:16 +00:00
2020-03-31 21:15:40 +00:00
2020-11-03 16:26:09 +00:00
2020-11-02 18:02:18 +00:00
2020-11-03 16:26:09 +00:00
2020-11-03 16:26:09 +00:00
2020-09-22 19:42:13 +00:00
2020-11-03 16:26:09 +00:00
2020-11-03 16:26:09 +00:00
2020-11-03 16:26:09 +00:00