reader/wgsl: Remove old token methods.

This CL removes the old token `Is<Name>()` methods which are no longer
being used in the parser or lexer. (Some of them were used in tests but
the generic `Is(<type>)` is used instead.

New `peek` methods are added which will peek if the given token comes
either next or at the given index.

Change-Id: I8d15f2a42889f981d273b6459d20c4202db1ae32
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57540
Auto-Submit: dan sinclair <dan.sinclair@gmail.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
dan sinclair
2021-07-12 11:21:51 +00:00
committed by Tint LUCI CQ
parent 9569e2c790
commit bf1ec305db
6 changed files with 111 additions and 386 deletions

View File

@@ -60,8 +60,7 @@ TEST_F(ResolverAtomicValidationTest, Local) {
WrapInFunction(Var("a", ty.atomic(Source{{12, 34}}, ty.i32())));
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(),
"12:34 error: atomic var requires workgroup storage");
EXPECT_EQ(r()->error(), "12:34 error: atomic var requires workgroup storage");
}
TEST_F(ResolverAtomicValidationTest, NoAtomicExpr) {