71 auto trimmed = [&] (
size_t start,
size_t end) {
72 while (names[start] ==
',' || isspace(names[start])) {
75 while (names[end] ==
',' || isspace(names[end])) {
78 return names.
substr(start, end - start + 1);
80 auto skipq = [&] (
size_t start,
char quote) {
81 for (
auto i = start + 1; i < names.
size() ; ++i) {
82 if (names[i] == quote)
91 std::stack<char> openings;
92 for (
size_t pos = 0; pos < names.
size(); ++pos) {
114 if (start != pos && openings.size() == 0) {
115 m_messages.emplace_back(macroName, lineInfo, resultType);
116 m_messages.back().message = trimmed(start, pos);
117 m_messages.back().message +=
" := ";
122 assert(openings.size() == 0 &&
"Mismatched openings");
123 m_messages.emplace_back(macroName, lineInfo, resultType);
124 m_messages.back().message = trimmed(start, names.
size() - 1);
125 m_messages.back().message +=
" := ";