Refactor macro args to be owned collectively by their fstack contexts

This commit is contained in:
Rangi42
2024-03-22 13:22:28 -04:00
committed by Sylvie
parent b85c5cde8f
commit 507439bc25
10 changed files with 78 additions and 84 deletions

View File

@@ -12,15 +12,13 @@ struct MacroArgs {
unsigned int shift;
std::vector<std::shared_ptr<std::string>> args;
void append(std::shared_ptr<std::string> arg);
uint32_t nbArgs() const { return args.size() - shift; }
std::shared_ptr<std::string> getArg(uint32_t i) const;
std::shared_ptr<std::string> getAllArgs() const;
void appendArg(std::shared_ptr<std::string> arg);
void shiftArgs(int32_t count);
};
bool macro_HasCurrentArgs();
std::shared_ptr<MacroArgs> macro_GetCurrentArgs();
void macro_UseNewArgs(std::shared_ptr<MacroArgs> args);
uint32_t macro_NbArgs();
std::shared_ptr<std::string> macro_GetArg(uint32_t i);
std::shared_ptr<std::string> macro_GetAllArgs();
void macro_ShiftCurrentArgs(int32_t count);
#endif // RGBDS_MACRO_H