diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wast-parser.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc index f2fcf73e..96e7d336 100644 --- a/src/wast-parser.cc +++ b/src/wast-parser.cc @@ -1505,16 +1505,11 @@ Result WastParser::ParseImportModuleField(Module* module) { Consume(); ParseBindVarOpt(&name); auto import = MakeUnique<FuncImport>(name); - if (PeekMatchLpar(TokenType::Type)) { - import->func.decl.has_func_type = true; - CHECK_RESULT(ParseTypeUseOpt(&import->func.decl)); - EXPECT(Rpar); - } else { - CHECK_RESULT( - ParseFuncSignature(&import->func.decl.sig, &import->func.bindings)); - CHECK_RESULT(ErrorIfLpar({"param", "result"})); - EXPECT(Rpar); - } + CHECK_RESULT(ParseTypeUseOpt(&import->func.decl)); + CHECK_RESULT( + ParseFuncSignature(&import->func.decl.sig, &import->func.bindings)); + CHECK_RESULT(ErrorIfLpar({"param", "result"})); + EXPECT(Rpar); field = MakeUnique<ImportModuleField>(std::move(import), loc); break; } |