wsgl parser: Tweak top-level unexpected token error message
I feel this reads better. Bug: tint:282 Change-Id: I04fe42a0347ea050e93e5cf5ccae7259bc79bb58 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32283 Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
b707258c8f
commit
1bbafa3445
|
@ -286,7 +286,7 @@ Expect<bool> ParserImpl::expect_global_decl() {
|
|||
if (decos.value.size() > 0) {
|
||||
add_error(peek(), "expected declaration after decorations");
|
||||
} else {
|
||||
add_error(peek(), "invalid token");
|
||||
add_error(peek(), "unexpected token");
|
||||
}
|
||||
return Failure::kErrored;
|
||||
}
|
||||
|
|
|
@ -1262,7 +1262,7 @@ TEST_F(ParserImplErrorTest, UnaryInvalidExpr) {
|
|||
|
||||
TEST_F(ParserImplErrorTest, UnexpectedToken) {
|
||||
EXPECT("unexpected",
|
||||
"test.wgsl:1:1 error: invalid token\n"
|
||||
"test.wgsl:1:1 error: unexpected token\n"
|
||||
"unexpected\n"
|
||||
"^^^^^^^^^^\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue