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

Method parse_limits

src/lib/parse/ParseContext.cpp:214–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212// ── Limits / MemType / TableType / GlobalType ─────────────────────────────────
213
214Limits ParseContext::parse_limits() {
215 Limits lim;
216 lim.min = parse_u64();
217 if (tok_.peek().type == TokenType::Integer) {
218 lim.max = parse_u64();
219 if (lim.min > lim.max.value())
220 throw Exception::Parse("limit min cannot exceed max", tok_.location());
221 }
222 return lim;
223}
224
225MemType ParseContext::parse_memtype() {
226 MemType mt;

Callers

nothing calls this directly

Calls 3

ParseClass · 0.85
peekMethod · 0.80
locationMethod · 0.45

Tested by

no test coverage detected