AST: Add ruc::Formatter for ASTNodes

This commit is contained in:
Riyyi
2023-03-24 21:46:01 +01:00
parent 27e584ea84
commit b51a3bf15b
2 changed files with 32 additions and 0 deletions
+9
View File
@@ -12,6 +12,8 @@
#include <typeinfo> // typeid
#include <vector>
#include "ruc/format/formatter.h"
namespace blaze {
class ASTNode {
@@ -205,3 +207,10 @@ inline bool ASTNode::fastIs<Value>() const { return isValue(); }
// clang-format on
} // namespace blaze
// -----------------------------------------
template<>
struct ruc::format::Formatter<blaze::ASTNode*> : public Formatter<std::string> {
void format(Builder& builder, blaze::ASTNode* value) const;
};