mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 20:01:22 +00:00
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) {
|
if (decos.value.size() > 0) {
|
||||||
add_error(peek(), "expected declaration after decorations");
|
add_error(peek(), "expected declaration after decorations");
|
||||||
} else {
|
} else {
|
||||||
add_error(peek(), "invalid token");
|
add_error(peek(), "unexpected token");
|
||||||
}
|
}
|
||||||
return Failure::kErrored;
|
return Failure::kErrored;
|
||||||
}
|
}
|
||||||
|
@ -1262,7 +1262,7 @@ TEST_F(ParserImplErrorTest, UnaryInvalidExpr) {
|
|||||||
|
|
||||||
TEST_F(ParserImplErrorTest, UnexpectedToken) {
|
TEST_F(ParserImplErrorTest, UnexpectedToken) {
|
||||||
EXPECT("unexpected",
|
EXPECT("unexpected",
|
||||||
"test.wgsl:1:1 error: invalid token\n"
|
"test.wgsl:1:1 error: unexpected token\n"
|
||||||
"unexpected\n"
|
"unexpected\n"
|
||||||
"^^^^^^^^^^\n");
|
"^^^^^^^^^^\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user