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.
Maybe the marks should be moved after the primary identifier of the node, WDYT? That would be more consistent with AST dump: first the node kind, then all its info.