mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
co-authored by
Jon Ross-Perkins
parent
05e061fe96
commit
289d05813e
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user