Refactor FileStackNode::dump to not need a helper function

This commit is contained in:
Rangi42
2024-03-10 13:21:28 -04:00
parent 58fdaa8747
commit 846a9411b9
5 changed files with 54 additions and 53 deletions

View File

@@ -42,7 +42,7 @@ struct FileStackNode {
FileStackNode(FileStackNodeType type_, std::variant<std::vector<uint32_t>, std::string> data_)
: type(type_), data(data_){};
void dump(uint32_t curLineNo) const;
std::string const &dump(uint32_t curLineNo) const;
};
#define DEFAULT_MAX_DEPTH 64

View File

@@ -56,7 +56,7 @@ struct FileStackNode {
std::string &name();
std::string const &name() const;
std::string const *dumpFileStack() const;
std::string const &dump(uint32_t curLineNo) const;
};
void warning(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...)