Fix a couple of typos found in parser_impl.cc

Change-Id: Ice4047838ad5c5e48803d8a529f3ca24d2ce77c5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31262
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2020-10-28 20:18:22 +00:00 committed by Commit Bot service account
parent adb10d60de
commit c23a5652bd
1 changed files with 1 additions and 5 deletions
src/reader/wgsl

View File

@ -1107,10 +1107,6 @@ ast::type::Type* ParserImpl::type_alias() {
set_error(peek(), "invalid type alias"); set_error(peek(), "invalid type alias");
return nullptr; return nullptr;
} }
if (type == nullptr) {
set_error(peek(), "invalid type for alias");
return nullptr;
}
auto* alias = auto* alias =
ctx_.type_mgr().Get(std::make_unique<ast::type::AliasType>(name, type)); ctx_.type_mgr().Get(std::make_unique<ast::type::AliasType>(name, type));
@ -1674,7 +1670,7 @@ bool ParserImpl::struct_member_decoration_decl(
for (;;) { for (;;) {
auto deco = struct_member_decoration(); auto deco = struct_member_decoration();
if (has_error()) if (has_error())
return {}; return false;
if (deco == nullptr) if (deco == nullptr)
break; break;