refactor(AST): improve AST node print operator
This commit is contained in:
@@ -125,7 +125,9 @@ public:
|
|||||||
* @param node Node to print.
|
* @param node Node to print.
|
||||||
* @return The output stream.
|
* @return The output stream.
|
||||||
*/
|
*/
|
||||||
friend std::ostream& operator<<(std::ostream& os, const node& node) { return node.print(os); }
|
friend std::ostream& operator<<(std::ostream& os, const node& node) {
|
||||||
|
return node.print(os << node.location() << ": ");
|
||||||
|
}
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Compares two nodes for equality.
|
* @brief Compares two nodes for equality.
|
||||||
|
|||||||
Reference in New Issue
Block a user