Explorer: Remove PrintDepth and implement PrintIndent. (#3113)

This PR removes `PrintDepth` from statement and declaration.
Implements `PrintIndent` for better indented formatting along with
various changes to make printing of statements and declarations better.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
Prabhat Sachdeva
2023-08-25 17:17:39 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent 05e061fe96
commit 289d05813e
17 changed files with 322 additions and 300 deletions
+3 -3
View File
@@ -343,12 +343,12 @@ void Expression::PrintID(llvm::raw_ostream& out) const {
case ExpressionKind::TypeTypeLiteral:
out << "type";
break;
case ExpressionKind::FunctionTypeLiteral:
case ExpressionKind::StructLiteral:
case ExpressionKind::ArrayTypeLiteral:
case ExpressionKind::ValueLiteral:
out << cast<ConstantValueLiteral>(*this).constant_value();
break;
case ExpressionKind::ArrayTypeLiteral:
case ExpressionKind::FunctionTypeLiteral:
case ExpressionKind::StructLiteral:
case ExpressionKind::IndexExpression:
case ExpressionKind::SimpleMemberAccessExpression:
case ExpressionKind::CompoundMemberAccessExpression: