mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Abbreviate Integer and FloatingPoint (#3435)
I was suggesting this because `FloatingPoint` is pretty long. `int` and `float` should be familiar abbreviations. `unsigned` should be familiar to developers too, but `UnsignedInt` still feels usefully clearer for the additional chars.
This commit is contained in:
@@ -33,8 +33,8 @@ auto HandleArrayExpr(Context& context, Parse::NodeId parse_node) -> bool {
|
||||
.PopAndDiscardSoloParseNode<Parse::NodeKind::ArrayExprSemi>();
|
||||
auto element_type_inst_id = context.node_stack().PopExpr();
|
||||
auto bound_inst = context.insts().Get(bound_inst_id);
|
||||
if (auto literal = bound_inst.TryAs<SemIR::IntegerLiteral>()) {
|
||||
const auto& bound_value = context.integers().Get(literal->integer_id);
|
||||
if (auto literal = bound_inst.TryAs<SemIR::IntLiteral>()) {
|
||||
const auto& bound_value = context.ints().Get(literal->int_id);
|
||||
// TODO: Produce an error if the array type is too large.
|
||||
if (bound_value.getActiveBits() <= 64) {
|
||||
context.AddInstAndPush(
|
||||
|
||||
Reference in New Issue
Block a user