#pragma once #include "chunk.h" #include #include #include #include #include #include using AsmArgs = std::vector; using FactoryFunction = std::function(AsmArgs&)>; // mnemonic: mnemonic including argument types bool registerOp(const std::string& mnemonic, FactoryFunction f); // Create Op from a registered mnemonic // mnemonic: just the mnemonic name std::shared_ptr makeOp(const std::string& mnemonic, AsmArgs& args); // overload for empty list of arguments std::shared_ptr makeOp(const std::string& mnemonic); std::shared_ptr