Functional changes in the dump:
- Surround Leaf tokens with '
- Append Node dumps with NodeRole information, except for unknown roles
Non-functional changes:
- ::dumpTokens(llvm::raw_ostream, ArrayRef<syntax::Token>, const SourceManager &SM) always received as parameter a syntax::Token * pointing to Leaf::token(). Changed the function to dumpLeaf(llvm::raw_ostream, syntax::Leaf *, const SourceManager&)
- dumpTree acted on a Node, rename to dumpNode
- use SourceManager in parameters for dump instead of Arena
TODO:
Adapt all the tree dumps in TreeTest.cpp to this new format.
clang-format: please reformat the code