| 7 | namespace Loader { |
| 8 | |
| 9 | Expect<void> Loader::loadSortIndex(AST::Component::SortIndex &SortIdx, |
| 10 | const bool IsCore) { |
| 11 | // sortidx ::= sort:<sort> idx:<u32> => (sort idx) |
| 12 | // core:sortidx ::= sort:<core:sort> idx:<u32> => (sort idx) |
| 13 | if (IsCore) { |
| 14 | EXPECTED_TRY(loadCoreSort(SortIdx.getSort())); |
| 15 | } else { |
| 16 | EXPECTED_TRY(loadSort(SortIdx.getSort())); |
| 17 | } |
| 18 | EXPECTED_TRY(uint32_t Idx, FMgr.readU32().map_error([this](auto E) { |
| 19 | return logLoadError(E, FMgr.getLastOffset(), ASTNodeAttr::Comp_Sort); |
| 20 | })); |
| 21 | SortIdx.setIdx(Idx); |
| 22 | return {}; |
| 23 | } |
| 24 | |
| 25 | Expect<void> Loader::loadSort(AST::Component::Sort &Sort) { |
| 26 | // sort ::= 0x00 cs:<core:sort> => core cs |
nothing calls this directly
no test coverage detected