MCPcopy Create free account
hub / github.com/WasmVM/WasmVM / parse_memarg

Method parse_memarg

src/lib/parse/instr_parse.cpp:401–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399// ── Memarg ────────────────────────────────────────────────────────────────────
400
401std::pair<offset_t, std::optional<align_t>> ParseContext::parse_memarg() {
402 std::pair<offset_t, std::optional<align_t>> result{0, std::nullopt};
403 if (tok_.peek().type == TokenType::Offset)
404 result.first = (offset_t)std::stoull(tok_.consume().text);
405 if (tok_.peek().type == TokenType::Align)
406 result.second = std::stoi(tok_.consume().text);
407 return result;
408}
409
410// ── Memory instructions ───────────────────────────────────────────────────────
411

Callers

nothing calls this directly

Calls 2

peekMethod · 0.80
consumeMethod · 0.45

Tested by

no test coverage detected