Allow negative values to count macro arguments from the end (#1670)

This commit is contained in:
Rangi authored and GitHub committed 2025-04-20 00:37:50 -04:00
1 parent df83bc31d2
commit 0b7cda9e0c
7 files changed
+91 -11

No files matched your search

+2 -2
View File
@@ -9,11 +9,11 @@
#include <vector>
struct MacroArgs {
unsigned int shift;
uint32_t shift;
std::vector<std::shared_ptr<std::string>> args;
uint32_t nbArgs() const { return args.size() - shift; }
std::shared_ptr<std::string> getArg(uint32_t i) const;
std::shared_ptr<std::string> getArg(int32_t i) const;
std::shared_ptr<std::string> getAllArgs() const;
void appendArg(std::shared_ptr<std::string> arg);