mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Refactor macro args to be owned collectively by their fstack contexts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user