//---------------------------------------------------------------------------// // 1100101 |_ mov #0, r4 __ // // 11 |_ <0xb380 %5c4> / _|_ _____ ___ // // 0110 |_ 3.50 -> 3.60 | _\ \ / _ (_-< // // |_ base# + offset |_| /_\_\___/__/ // //---------------------------------------------------------------------------// #include #include namespace FxOS { SymbolTable::SymbolTable() { } void SymbolTable::add(Symbol s) { symbols.push_back(s); } std::optional SymbolTable::query( Symbol::Type type, uint32_t value) const { for(auto &sym: symbols) { if(sym.type == type && sym.value == value) return sym.name; } return std::nullopt; } std::optional SymbolTable::lookup(std::string name) const { for(auto &sym: symbols) { if(sym.name == name) return sym; } return std::nullopt; } } /* namespace FxOS */