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

Method parse_memtype

src/lib/parse/ParseContext.cpp:225–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225MemType ParseContext::parse_memtype() {
226 MemType mt;
227 // Optional index-type keyword: i32 (default) or i64 (memory64)
228 Token tok = tok_.peek();
229 if(tok.type == TokenType::Keyword && (tok.text == "i32" || tok.text == "i64")) {
230 tok_.consume();
231 mt.is64 = (tok.text == "i64");
232 }
233 mt.min = parse_u64();
234 if(tok_.peek().type == TokenType::Integer) {
235 mt.max = parse_u64();
236 if(mt.min > mt.max.value())
237 throw Exception::Parse("limit min cannot exceed max", tok_.location());
238 }
239 return mt;
240}
241
242TableType ParseContext::parse_tabletype() {
243 TableType tt;

Callers

nothing calls this directly

Calls 4

ParseClass · 0.85
peekMethod · 0.80
consumeMethod · 0.45
locationMethod · 0.45

Tested by

no test coverage detected