mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 12:50:12 +01:00
Initial support for statically-sized arrays (#1158)
This commit is contained in:
@@ -176,6 +176,12 @@ void Expression::Print(llvm::raw_ostream& out) const {
|
||||
out << ")";
|
||||
break;
|
||||
}
|
||||
case ExpressionKind::ArrayTypeLiteral: {
|
||||
const auto& array_literal = cast<ArrayTypeLiteral>(*this);
|
||||
out << "[" << array_literal.element_type_expression() << "; "
|
||||
<< array_literal.size_expression() << "]";
|
||||
break;
|
||||
}
|
||||
case ExpressionKind::IdentifierExpression:
|
||||
case ExpressionKind::IntLiteral:
|
||||
case ExpressionKind::BoolLiteral:
|
||||
@@ -232,6 +238,7 @@ void Expression::PrintID(llvm::raw_ostream& out) const {
|
||||
case ExpressionKind::IntrinsicExpression:
|
||||
case ExpressionKind::UnimplementedExpression:
|
||||
case ExpressionKind::FunctionTypeLiteral:
|
||||
case ExpressionKind::ArrayTypeLiteral:
|
||||
out << "...";
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user