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

Function IsModuleField

src/wast-parser.cc:268–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268bool IsModuleField(TokenTypePair pair) {
269 if (pair[0] != TokenType::Lpar) {
270 return false;
271 }
272
273 switch (pair[1]) {
274 case TokenType::Data:
275 case TokenType::Elem:
276 case TokenType::Tag:
277 case TokenType::Export:
278 case TokenType::Func:
279 case TokenType::Type:
280 case TokenType::Global:
281 case TokenType::Import:
282 case TokenType::Memory:
283 case TokenType::Start:
284 case TokenType::Table:
285 return true;
286 default:
287 return false;
288 }
289}
290
291bool IsCommand(TokenTypePair pair) {
292 if (pair[0] != TokenType::Lpar) {

Callers 4

ParseModuleMethod · 0.85
ParseScriptMethod · 0.85
ParseModuleFieldListMethod · 0.85
ParseScriptModuleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected