Use std::string for macro args

This commit is contained in:
Rangi42
2024-03-02 05:23:15 -05:00
parent b130c2e27c
commit 2069a95e0f
5 changed files with 14 additions and 26 deletions

View File

@@ -52,7 +52,6 @@
#include "extern/utf8decoder.hpp"
#include "helpers.hpp"
#include "platform.hpp" // strncasecmp, strdup
static CaptureBody captureBody; // Captures a REPT/FOR or MACRO
@@ -507,10 +506,9 @@ macroargs : %empty {
if (!$$)
fatalerror("Failed to allocate memory for macro arguments: %s\n",
strerror(errno));
$$->shift = 0;
}
| macroargs T_STRING {
$$->append(strdup($2));
$$->append($2);
}
;