|
|
@@ -10,6 +10,7 @@
|
|
|
|
|
|
#include "common/raw_string_ostream.h"
|
|
|
#include "toolchain/lex/dump.h"
|
|
|
+#include "toolchain/parse/context.h"
|
|
|
|
|
|
namespace Carbon::Parse {
|
|
|
|
|
|
@@ -33,6 +34,16 @@ LLVM_DUMP_METHOD auto Dump(const Tree& tree, NodeId node_id) -> std::string {
|
|
|
return out.TakeStr();
|
|
|
}
|
|
|
|
|
|
+static LLVM_DUMP_METHOD auto Dump(const Context& context, Lex::TokenIndex token)
|
|
|
+ -> std::string {
|
|
|
+ return Dump(context.tree(), token);
|
|
|
+}
|
|
|
+
|
|
|
+static LLVM_DUMP_METHOD auto Dump(const Context& context, NodeId node_id)
|
|
|
+ -> std::string {
|
|
|
+ return Dump(context.tree(), node_id);
|
|
|
+}
|
|
|
+
|
|
|
} // namespace Carbon::Parse
|
|
|
|
|
|
#endif // NDEBUG
|