@@ -1163,11 +1163,11 @@ class ArrayElems
1163
1163
// Value array elements
1164
1164
class ArrayElemsValues : public ArrayElems
1165
1165
{
1166
- std::vector<std::unique_ptr<Expr> > values;
1166
+ std::vector<std::unique_ptr<Expr>> values;
1167
1167
location_t locus;
1168
1168
1169
1169
public:
1170
- ArrayElemsValues (std::vector<std::unique_ptr<Expr> > elems, location_t locus)
1170
+ ArrayElemsValues (std::vector<std::unique_ptr<Expr>> elems, location_t locus)
1171
1171
: ArrayElems (), values (std::move (elems)), locus (locus)
1172
1172
{}
1173
1173
@@ -1200,11 +1200,11 @@ class ArrayElemsValues : public ArrayElems
1200
1200
void accept_vis (ASTVisitor &vis) override ;
1201
1201
1202
1202
// TODO: this mutable getter seems really dodgy. Think up better way.
1203
- const std::vector<std::unique_ptr<Expr> > &get_values () const
1203
+ const std::vector<std::unique_ptr<Expr>> &get_values () const
1204
1204
{
1205
1205
return values;
1206
1206
}
1207
- std::vector<std::unique_ptr<Expr> > &get_values () { return values; }
1207
+ std::vector<std::unique_ptr<Expr>> &get_values () { return values; }
1208
1208
1209
1209
size_t get_num_values () const { return values.size (); }
1210
1210
@@ -1481,7 +1481,7 @@ class TupleExpr : public ExprWithoutBlock
1481
1481
{
1482
1482
std::vector<Attribute> outer_attrs;
1483
1483
std::vector<Attribute> inner_attrs;
1484
- std::vector<std::unique_ptr<Expr> > tuple_elems;
1484
+ std::vector<std::unique_ptr<Expr>> tuple_elems;
1485
1485
location_t locus;
1486
1486
1487
1487
// TODO: find another way to store this to save memory?
@@ -1501,7 +1501,7 @@ class TupleExpr : public ExprWithoutBlock
1501
1501
outer_attrs = std::move (new_attrs);
1502
1502
}
1503
1503
1504
- TupleExpr (std::vector<std::unique_ptr<Expr> > tuple_elements,
1504
+ TupleExpr (std::vector<std::unique_ptr<Expr>> tuple_elements,
1505
1505
std::vector<Attribute> inner_attribs,
1506
1506
std::vector<Attribute> outer_attribs, location_t locus)
1507
1507
: outer_attrs (std::move (outer_attribs)),
@@ -1552,14 +1552,11 @@ class TupleExpr : public ExprWithoutBlock
1552
1552
bool is_marked_for_strip () const override { return marked_for_strip; }
1553
1553
1554
1554
// TODO: this mutable getter seems really dodgy. Think up better way.
1555
- const std::vector<std::unique_ptr<Expr> > &get_tuple_elems () const
1556
- {
1557
- return tuple_elems;
1558
- }
1559
- std::vector<std::unique_ptr<Expr> > &get_tuple_elems ()
1555
+ const std::vector<std::unique_ptr<Expr>> &get_tuple_elems () const
1560
1556
{
1561
1557
return tuple_elems;
1562
1558
}
1559
+ std::vector<std::unique_ptr<Expr>> &get_tuple_elems () { return tuple_elems; }
1563
1560
1564
1561
bool is_unit () const { return tuple_elems.size () == 0 ; }
1565
1562
@@ -1983,7 +1980,7 @@ class StructExprFieldIndexValue : public StructExprFieldWithVal
1983
1980
class StructExprStructFields : public StructExprStruct
1984
1981
{
1985
1982
// std::vector<StructExprField> fields;
1986
- std::vector<std::unique_ptr<StructExprField> > fields;
1983
+ std::vector<std::unique_ptr<StructExprField>> fields;
1987
1984
1988
1985
// bool has_struct_base;
1989
1986
StructBase struct_base;
@@ -1996,8 +1993,8 @@ class StructExprStructFields : public StructExprStruct
1996
1993
// Constructor for StructExprStructFields when no struct base is used
1997
1994
StructExprStructFields (
1998
1995
PathInExpression struct_path,
1999
- std::vector<std::unique_ptr<StructExprField> > expr_fields,
2000
- location_t locus, StructBase base_struct = StructBase::error (),
1996
+ std::vector<std::unique_ptr<StructExprField>> expr_fields, location_t locus ,
1997
+ StructBase base_struct = StructBase::error (),
2001
1998
std::vector<Attribute> inner_attribs = std::vector<Attribute> (),
2002
1999
std::vector<Attribute> outer_attribs = std::vector<Attribute> ())
2003
2000
: StructExprStruct (std::move (struct_path), std::move (inner_attribs),
@@ -2034,11 +2031,11 @@ class StructExprStructFields : public StructExprStruct
2034
2031
void accept_vis (ASTVisitor &vis) override ;
2035
2032
2036
2033
// TODO: this mutable getter seems really dodgy. Think up better way.
2037
- std::vector<std::unique_ptr<StructExprField> > &get_fields ()
2034
+ std::vector<std::unique_ptr<StructExprField>> &get_fields ()
2038
2035
{
2039
2036
return fields;
2040
2037
}
2041
- const std::vector<std::unique_ptr<StructExprField> > &get_fields () const
2038
+ const std::vector<std::unique_ptr<StructExprField>> &get_fields () const
2042
2039
{
2043
2040
return fields;
2044
2041
}
@@ -2095,7 +2092,7 @@ class CallExpr : public ExprWithoutBlock
2095
2092
{
2096
2093
std::vector<Attribute> outer_attrs;
2097
2094
std::unique_ptr<Expr> function;
2098
- std::vector<std::unique_ptr<Expr> > params;
2095
+ std::vector<std::unique_ptr<Expr>> params;
2099
2096
location_t locus;
2100
2097
2101
2098
public:
@@ -2104,7 +2101,7 @@ class CallExpr : public ExprWithoutBlock
2104
2101
std::string as_string () const override ;
2105
2102
2106
2103
CallExpr (std::unique_ptr<Expr> function_expr,
2107
- std::vector<std::unique_ptr<Expr> > function_params,
2104
+ std::vector<std::unique_ptr<Expr>> function_params,
2108
2105
std::vector<Attribute> outer_attribs, location_t locus)
2109
2106
: outer_attrs (std::move (outer_attribs)),
2110
2107
function (std::move (function_expr)),
@@ -2161,11 +2158,11 @@ class CallExpr : public ExprWithoutBlock
2161
2158
bool is_marked_for_strip () const override { return function == nullptr ; }
2162
2159
2163
2160
// TODO: this mutable getter seems really dodgy. Think up better way.
2164
- const std::vector<std::unique_ptr<Expr> > &get_params () const
2161
+ const std::vector<std::unique_ptr<Expr>> &get_params () const
2165
2162
{
2166
2163
return params;
2167
2164
}
2168
- std::vector<std::unique_ptr<Expr> > &get_params () { return params; }
2165
+ std::vector<std::unique_ptr<Expr>> &get_params () { return params; }
2169
2166
2170
2167
// TODO: is this better? Or is a "vis_block" better?
2171
2168
Expr &get_function_expr ()
@@ -2201,15 +2198,15 @@ class MethodCallExpr : public ExprWithoutBlock
2201
2198
std::vector<Attribute> outer_attrs;
2202
2199
std::unique_ptr<Expr> receiver;
2203
2200
PathExprSegment method_name;
2204
- std::vector<std::unique_ptr<Expr> > params;
2201
+ std::vector<std::unique_ptr<Expr>> params;
2205
2202
location_t locus;
2206
2203
2207
2204
public:
2208
2205
std::string as_string () const override ;
2209
2206
2210
2207
MethodCallExpr (std::unique_ptr<Expr> call_receiver,
2211
2208
PathExprSegment method_path,
2212
- std::vector<std::unique_ptr<Expr> > method_params,
2209
+ std::vector<std::unique_ptr<Expr>> method_params,
2213
2210
std::vector<Attribute> outer_attribs, location_t locus)
2214
2211
: outer_attrs (std::move (outer_attribs)),
2215
2212
receiver (std::move (call_receiver)),
@@ -2265,11 +2262,11 @@ class MethodCallExpr : public ExprWithoutBlock
2265
2262
bool is_marked_for_strip () const override { return receiver == nullptr ; }
2266
2263
2267
2264
// TODO: this mutable getter seems really dodgy. Think up better way.
2268
- const std::vector<std::unique_ptr<Expr> > &get_params () const
2265
+ const std::vector<std::unique_ptr<Expr>> &get_params () const
2269
2266
{
2270
2267
return params;
2271
2268
}
2272
- std::vector<std::unique_ptr<Expr> > &get_params () { return params; }
2269
+ std::vector<std::unique_ptr<Expr>> &get_params () { return params; }
2273
2270
2274
2271
// TODO: is this better? Or is a "vis_block" better?
2275
2272
Expr &get_receiver_expr ()
@@ -2596,7 +2593,7 @@ class BlockExpr : public ExprWithBlock
2596
2593
{
2597
2594
std::vector<Attribute> outer_attrs;
2598
2595
std::vector<Attribute> inner_attrs;
2599
- std::vector<std::unique_ptr<Stmt> > statements;
2596
+ std::vector<std::unique_ptr<Stmt>> statements;
2600
2597
std::unique_ptr<Expr> expr;
2601
2598
tl::optional<LoopLabel> label;
2602
2599
location_t start_locus;
@@ -2612,7 +2609,7 @@ class BlockExpr : public ExprWithBlock
2612
2609
// Returns whether the block contains a final expression.
2613
2610
bool has_tail_expr () const { return expr != nullptr ; }
2614
2611
2615
- BlockExpr (std::vector<std::unique_ptr<Stmt> > block_statements,
2612
+ BlockExpr (std::vector<std::unique_ptr<Stmt>> block_statements,
2616
2613
std::unique_ptr<Expr> block_expr,
2617
2614
std::vector<Attribute> inner_attribs,
2618
2615
std::vector<Attribute> outer_attribs,
@@ -2691,11 +2688,11 @@ class BlockExpr : public ExprWithBlock
2691
2688
const std::vector<Attribute> &get_inner_attrs () const { return inner_attrs; }
2692
2689
std::vector<Attribute> &get_inner_attrs () { return inner_attrs; }
2693
2690
2694
- const std::vector<std::unique_ptr<Stmt> > &get_statements () const
2691
+ const std::vector<std::unique_ptr<Stmt>> &get_statements () const
2695
2692
{
2696
2693
return statements;
2697
2694
}
2698
- std::vector<std::unique_ptr<Stmt> > &get_statements () { return statements; }
2695
+ std::vector<std::unique_ptr<Stmt>> &get_statements () { return statements; }
2699
2696
2700
2697
// TODO: is this better? Or is a "vis_block" better?
2701
2698
Expr &get_tail_expr ()
@@ -4081,14 +4078,14 @@ class WhileLoopExpr : public BaseLoopExpr
4081
4078
class WhileLetLoopExpr : public BaseLoopExpr
4082
4079
{
4083
4080
// MatchArmPatterns patterns;
4084
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
4081
+ std::vector<std::unique_ptr<Pattern>> match_arm_patterns; // inlined
4085
4082
std::unique_ptr<Expr> scrutinee;
4086
4083
4087
4084
public:
4088
4085
std::string as_string () const override ;
4089
4086
4090
4087
// Constructor with a loop label
4091
- WhileLetLoopExpr (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
4088
+ WhileLetLoopExpr (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
4092
4089
std::unique_ptr<Expr> scrutinee,
4093
4090
std::unique_ptr<BlockExpr> loop_block, location_t locus,
4094
4091
tl::optional<LoopLabel> loop_label = tl::nullopt,
@@ -4142,11 +4139,11 @@ class WhileLetLoopExpr : public BaseLoopExpr
4142
4139
}
4143
4140
4144
4141
// TODO: this mutable getter seems really dodgy. Think up better way.
4145
- const std::vector<std::unique_ptr<Pattern> > &get_patterns () const
4142
+ const std::vector<std::unique_ptr<Pattern>> &get_patterns () const
4146
4143
{
4147
4144
return match_arm_patterns;
4148
4145
}
4149
- std::vector<std::unique_ptr<Pattern> > &get_patterns ()
4146
+ std::vector<std::unique_ptr<Pattern>> &get_patterns ()
4150
4147
{
4151
4148
return match_arm_patterns;
4152
4149
}
@@ -4429,15 +4426,15 @@ class IfExprConseqElse : public IfExpr
4429
4426
class IfLetExpr : public ExprWithBlock
4430
4427
{
4431
4428
std::vector<Attribute> outer_attrs;
4432
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
4429
+ std::vector<std::unique_ptr<Pattern>> match_arm_patterns; // inlined
4433
4430
std::unique_ptr<Expr> value;
4434
4431
std::unique_ptr<BlockExpr> if_block;
4435
4432
location_t locus;
4436
4433
4437
4434
public:
4438
4435
std::string as_string () const override ;
4439
4436
4440
- IfLetExpr (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
4437
+ IfLetExpr (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
4441
4438
std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
4442
4439
std::vector<Attribute> outer_attrs, location_t locus)
4443
4440
: outer_attrs (std::move (outer_attrs)),
@@ -4531,11 +4528,11 @@ class IfLetExpr : public ExprWithBlock
4531
4528
}
4532
4529
4533
4530
// TODO: this mutable getter seems really dodgy. Think up better way.
4534
- const std::vector<std::unique_ptr<Pattern> > &get_patterns () const
4531
+ const std::vector<std::unique_ptr<Pattern>> &get_patterns () const
4535
4532
{
4536
4533
return match_arm_patterns;
4537
4534
}
4538
- std::vector<std::unique_ptr<Pattern> > &get_patterns ()
4535
+ std::vector<std::unique_ptr<Pattern>> &get_patterns ()
4539
4536
{
4540
4537
return match_arm_patterns;
4541
4538
}
@@ -4575,11 +4572,11 @@ class IfLetExprConseqElse : public IfLetExpr
4575
4572
public:
4576
4573
std::string as_string () const override ;
4577
4574
4578
- IfLetExprConseqElse (
4579
- std::vector<std:: unique_ptr<Pattern> > match_arm_patterns ,
4580
- std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
4581
- std::unique_ptr<ExprWithBlock> else_block,
4582
- std::vector<Attribute> outer_attrs, location_t locus)
4575
+ IfLetExprConseqElse (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
4576
+ std::unique_ptr<Expr> value ,
4577
+ std::unique_ptr<BlockExpr> if_block,
4578
+ std::unique_ptr<ExprWithBlock> else_block,
4579
+ std::vector<Attribute> outer_attrs, location_t locus)
4583
4580
: IfLetExpr (std::move (match_arm_patterns), std::move (value),
4584
4581
std::move (if_block), std::move (outer_attrs), locus),
4585
4582
else_block (std::move (else_block))
@@ -4632,7 +4629,7 @@ struct MatchArm
4632
4629
private:
4633
4630
std::vector<Attribute> outer_attrs;
4634
4631
// MatchArmPatterns patterns;
4635
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
4632
+ std::vector<std::unique_ptr<Pattern>> match_arm_patterns; // inlined
4636
4633
4637
4634
// bool has_match_arm_guard;
4638
4635
// inlined from MatchArmGuard
@@ -4645,7 +4642,7 @@ struct MatchArm
4645
4642
bool has_match_arm_guard () const { return guard_expr != nullptr ; }
4646
4643
4647
4644
// Constructor for match arm with a guard expression
4648
- MatchArm (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
4645
+ MatchArm (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
4649
4646
location_t locus, std::unique_ptr<Expr> guard_expr = nullptr ,
4650
4647
std::vector<Attribute> outer_attrs = std::vector<Attribute> ())
4651
4648
: outer_attrs (std::move (outer_attrs)),
@@ -4697,7 +4694,7 @@ struct MatchArm
4697
4694
static MatchArm create_error ()
4698
4695
{
4699
4696
location_t locus = UNDEF_LOCATION;
4700
- return MatchArm (std::vector<std::unique_ptr<Pattern> > (), locus);
4697
+ return MatchArm (std::vector<std::unique_ptr<Pattern>> (), locus);
4701
4698
}
4702
4699
4703
4700
std::string as_string () const ;
@@ -4719,11 +4716,11 @@ struct MatchArm
4719
4716
const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
4720
4717
std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
4721
4718
4722
- const std::vector<std::unique_ptr<Pattern> > &get_patterns () const
4719
+ const std::vector<std::unique_ptr<Pattern>> &get_patterns () const
4723
4720
{
4724
4721
return match_arm_patterns;
4725
4722
}
4726
- std::vector<std::unique_ptr<Pattern> > &get_patterns ()
4723
+ std::vector<std::unique_ptr<Pattern>> &get_patterns ()
4727
4724
{
4728
4725
return match_arm_patterns;
4729
4726
}
0 commit comments