format_opcode_gender.hpp (858B)
1 #ifndef GUARD_WHOLY_DIDELPHIC_FLOORER_OUTKISSES_8816 2 #define GUARD_WHOLY_DIDELPHIC_FLOORER_OUTKISSES_8816 3 #pragma once 4 5 #include "libshit/span.hpp" 6 #include "libshit/translate/format_parser.hpp" 7 #include "libshit/translate/type.hpp" 8 9 #include <cstddef> 10 #include <string> 11 12 // IWYU pragma: no_forward_declare Libshit::Translate::FormatOpcodes 13 14 namespace Libshit::Translate 15 { 16 class Context; 17 18 // 0 |04| i| s|xx| i=arg index, s=size 19 // 4 |str pos | s count strings 20 // 8 |str size | 21 // ... 22 23 template<> 24 struct FormatOpcodes<FormatOpcode::GENDER> 25 { 26 const FormatData& data; 27 std::size_t& pc; 28 29 void UpdateTypes(Types& types); 30 31 void Format( 32 std::string& out, const Context& ctx, Span<const ArgumentType> args); 33 34 static unsigned Register(RegisterArgs&& r); 35 static unsigned RegisterAdv(RegisterArgs&& r); 36 37 }; 38 } 39 40 #endif