| 7 | namespace Loader { |
| 8 | |
| 9 | Expect<void> Loader::loadExternName(std::string &Name) { |
| 10 | // importname' ::= 0x00 len:<u32> in:<importname> => in (if len = |in|) |
| 11 | // exportname' ::= 0x00 len:<u32> en:<exportname> => en (if len = |en|) |
| 12 | |
| 13 | // Error messages will be handled in the parent scope. |
| 14 | EXPECTED_TRY(auto B, FMgr.readByte()); |
| 15 | if (B != 0x00) { |
| 16 | return Unexpect(ErrCode::Value::MalformedName); |
| 17 | } |
| 18 | EXPECTED_TRY(Name, FMgr.readName()); |
| 19 | return {}; |
| 20 | } |
| 21 | |
| 22 | Expect<void> Loader::loadType(ComponentValType &Ty) { |
| 23 | // valtype ::= i:<typeidx> => i |
nothing calls this directly
no test coverage detected