MCPcopy Create free account
hub / github.com/WebAssembly/wabt / ParseInstr

Method ParseInstr

src/wast-parser.cc:2290–2308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2288}
2289
2290Result WastParser::ParseInstr(ExprList* exprs) {
2291 WABT_TRACE(ParseInstr);
2292 if (IsPlainInstr(Peek())) {
2293 std::unique_ptr<Expr> expr;
2294 CHECK_RESULT(ParsePlainInstr(&expr));
2295 exprs->push_back(std::move(expr));
2296 return Result::Ok;
2297 } else if (IsBlockInstr(Peek())) {
2298 std::unique_ptr<Expr> expr;
2299 CHECK_RESULT(ParseBlockInstr(&expr));
2300 exprs->push_back(std::move(expr));
2301 return Result::Ok;
2302 } else if (PeekMatchExpr()) {
2303 return ParseExpr(exprs);
2304 } else {
2305 assert(!"ParseInstr should only be called when IsInstr() is true");
2306 return Result::Error;
2307 }
2308}
2309
2310Result WastParser::ParseCodeMetadataAnnotation(ExprList* exprs) {
2311 WABT_TRACE(ParseCodeMetadataAnnotation);

Callers

nothing calls this directly

Calls 3

IsPlainInstrFunction · 0.85
IsBlockInstrFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected