mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
Review feeback from 106420
Change-Id: I9c1ec7f26b0fda25bcedc86fec66d174fe81ed5f Bug: tint:1633, tint:1451 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106843 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
29f61747bf
commit
3a1b799585
@@ -2456,10 +2456,10 @@ Maybe<const ast::Statement*> ParserImpl::break_if_statement() {
|
||||
return Failure::kErrored;
|
||||
}
|
||||
if (!expr.matched) {
|
||||
return add_error(t1, "expected expression for `break if`");
|
||||
return add_error(t1, "expected expression for `break-if`");
|
||||
}
|
||||
if (!match(Token::Type::kSemicolon)) {
|
||||
return add_error(peek(), "expected ';' for `break if` statement");
|
||||
if (!expect("`break-if` statement", Token::Type::kSemicolon)) {
|
||||
return Failure::kErrored;
|
||||
}
|
||||
|
||||
return create<ast::BreakIfStatement>(t1.source(), expr.value);
|
||||
|
||||
@@ -129,7 +129,7 @@ TEST_F(ParserImplTest, LoopStmt_Continuing_BreakIf_MissingExpr) {
|
||||
EXPECT_TRUE(e.errored);
|
||||
EXPECT_TRUE(p->has_error());
|
||||
EXPECT_EQ(e.value, nullptr);
|
||||
EXPECT_EQ(p->error(), "1:21: expected expression for `break if`");
|
||||
EXPECT_EQ(p->error(), "1:21: expected expression for `break-if`");
|
||||
}
|
||||
|
||||
TEST_F(ParserImplTest, LoopStmt_Continuing_BreakIf_InvalidExpr) {
|
||||
@@ -139,7 +139,7 @@ TEST_F(ParserImplTest, LoopStmt_Continuing_BreakIf_InvalidExpr) {
|
||||
EXPECT_TRUE(e.errored);
|
||||
EXPECT_TRUE(p->has_error());
|
||||
EXPECT_EQ(e.value, nullptr);
|
||||
EXPECT_EQ(p->error(), "1:21: expected expression for `break if`");
|
||||
EXPECT_EQ(p->error(), "1:21: expected expression for `break-if`");
|
||||
}
|
||||
|
||||
TEST_F(ParserImplTest, LoopStmt_NoContinuing_BreakIf) {
|
||||
@@ -159,7 +159,7 @@ TEST_F(ParserImplTest, LoopStmt_Continuing_BreakIf_MissingSemicolon) {
|
||||
EXPECT_TRUE(e.errored);
|
||||
EXPECT_TRUE(p->has_error());
|
||||
EXPECT_EQ(e.value, nullptr);
|
||||
EXPECT_EQ(p->error(), "1:40: expected ';' for `break if` statement");
|
||||
EXPECT_EQ(p->error(), "1:40: expected ';' for `break-if` statement");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user