@@ -721,7 +721,7 @@ struct postfix_expression_node
721
721
if (ops.empty ()) {
722
722
return false ;
723
723
} else {
724
- return (ops.front ().op ->type () == lexeme::Ampersand
724
+ return (ops.front ().op ->type () == lexeme::Ampersand
725
725
|| ops.front ().op ->type () == lexeme::Tilde);
726
726
}
727
727
}
@@ -3993,7 +3993,7 @@ class parser
3993
3993
// || curr().type() == lexeme::LeftBrace
3994
3994
)
3995
3995
{
3996
- bool inside_initializer = (
3996
+ bool inside_initializer = (
3997
3997
peek (-1 ) && peek (-1 )->type () == lexeme::Assignment
3998
3998
);
3999
3999
auto open_paren = &curr ();
@@ -4015,12 +4015,12 @@ class parser
4015
4015
next ();
4016
4016
if (
4017
4017
curr ().type () != lexeme::Semicolon
4018
- && curr ().type () != lexeme::RightParen
4019
- && curr ().type () != lexeme::RightBracket
4018
+ && curr ().type () != lexeme::RightParen
4019
+ && curr ().type () != lexeme::RightBracket
4020
4020
&& curr ().type () != lexeme::Comma
4021
4021
) {
4022
4022
expr_list->inside_initializer = false ;
4023
- }
4023
+ }
4024
4024
n->expr = std::move (expr_list);
4025
4025
return n;
4026
4026
}
@@ -4060,6 +4060,7 @@ class parser
4060
4060
&& curr ().type () != lexeme::LeftParen // not imediatelly called
4061
4061
&& curr ().type () != lexeme::RightParen // not as a last argument to function
4062
4062
&& curr ().type () != lexeme::Comma // not as first or in-the-middle, function argument
4063
+ && curr ().type () != lexeme::Greater // not as the last argument to template
4063
4064
&& curr ().type () != lexeme::RightBracket // not as the last index argument
4064
4065
&& curr () != " is" // not as the argument to is
4065
4066
&& curr () != " as" // not as the argument to as
@@ -4382,7 +4383,7 @@ class parser
4382
4383
// G shift-expression '<<' additive-expression
4383
4384
// G shift-expression '>>' additive-expression
4384
4385
// G
4385
- auto shift_expression (bool allow_angle_operators = true )
4386
+ auto shift_expression (bool allow_angle_operators = true )
4386
4387
-> auto
4387
4388
{
4388
4389
if (allow_angle_operators) {
@@ -4417,7 +4418,7 @@ class parser
4417
4418
// G shift-expression
4418
4419
// G compare-expression '<=>' shift-expression
4419
4420
// G
4420
- auto compare_expression (bool allow_angle_operators = true )
4421
+ auto compare_expression (bool allow_angle_operators = true )
4421
4422
-> auto
4422
4423
{
4423
4424
return binary_expression<compare_expression_node> (
@@ -4433,7 +4434,7 @@ class parser
4433
4434
// G relational-expression '<=' compare-expression
4434
4435
// G relational-expression '>=' compare-expression
4435
4436
// G
4436
- auto relational_expression (bool allow_angle_operators = true )
4437
+ auto relational_expression (bool allow_angle_operators = true )
4437
4438
-> auto
4438
4439
{
4439
4440
if (allow_angle_operators) {
@@ -4465,7 +4466,7 @@ class parser
4465
4466
// G equality-expression '==' relational-expression
4466
4467
// G equality-expression '!=' relational-expression
4467
4468
// G
4468
- auto equality_expression (bool allow_angle_operators = true )
4469
+ auto equality_expression (bool allow_angle_operators = true )
4469
4470
-> auto
4470
4471
{
4471
4472
return binary_expression<equality_expression_node> (
@@ -4478,7 +4479,7 @@ class parser
4478
4479
// G equality-expression
4479
4480
// G bit-and-expression '&' equality-expression
4480
4481
// G
4481
- auto bit_and_expression (bool allow_angle_operators = true )
4482
+ auto bit_and_expression (bool allow_angle_operators = true )
4482
4483
-> auto
4483
4484
{
4484
4485
return binary_expression<bit_and_expression_node> (
@@ -4491,7 +4492,7 @@ class parser
4491
4492
// G bit-and-expression
4492
4493
// G bit-xor-expression '^' bit-and-expression
4493
4494
// G
4494
- auto bit_xor_expression (bool allow_angle_operators = true )
4495
+ auto bit_xor_expression (bool allow_angle_operators = true )
4495
4496
-> auto
4496
4497
{
4497
4498
return binary_expression<bit_xor_expression_node> (
@@ -4504,7 +4505,7 @@ class parser
4504
4505
// G bit-xor-expression
4505
4506
// G bit-or-expression '|' bit-xor-expression
4506
4507
// G
4507
- auto bit_or_expression (bool allow_angle_operators = true )
4508
+ auto bit_or_expression (bool allow_angle_operators = true )
4508
4509
-> auto
4509
4510
{
4510
4511
return binary_expression<bit_or_expression_node> (
@@ -4517,7 +4518,7 @@ class parser
4517
4518
// G bit-or-expression
4518
4519
// G logical-and-expression '&&' bit-or-expression
4519
4520
// G
4520
- auto logical_and_expression (bool allow_angle_operators = true )
4521
+ auto logical_and_expression (bool allow_angle_operators = true )
4521
4522
-> auto
4522
4523
{
4523
4524
return binary_expression<logical_and_expression_node> (
@@ -4532,7 +4533,7 @@ class parser
4532
4533
// G logical-and-expression
4533
4534
// G logical-or-expression '||' logical-and-expression
4534
4535
// G
4535
- auto logical_or_expression (bool allow_angle_operators = true )
4536
+ auto logical_or_expression (bool allow_angle_operators = true )
4536
4537
-> auto
4537
4538
{
4538
4539
return binary_expression<logical_or_expression_node> (
@@ -4850,7 +4851,7 @@ class parser
4850
4851
4851
4852
n->open_angle = curr ().position ();
4852
4853
next ();
4853
-
4854
+
4854
4855
auto term = unqualified_id_node::term{};
4855
4856
4856
4857
do {
@@ -6421,7 +6422,7 @@ class parser
6421
6422
}
6422
6423
assert (n->is_type ());
6423
6424
}
6424
-
6425
+
6425
6426
// Or a function type, declaring a function - and tell the function whether it's in a user-defined type
6426
6427
else if (auto t = function_type (n.get (), named))
6427
6428
{
@@ -6569,11 +6570,11 @@ class parser
6569
6570
)
6570
6571
{
6571
6572
auto & type = std::get<declaration_node::an_object>(n->type );
6572
- // object initialized by the address of the curr() object
6573
+ // object initialized by the address of the curr() object
6573
6574
if (peek (1 )->type () == lexeme::Ampersand) {
6574
6575
type->address_of = &curr ();
6575
6576
}
6576
- // object initialized by (potentially multiple) dereference of the curr() object
6577
+ // object initialized by (potentially multiple) dereference of the curr() object
6577
6578
else if (peek (1 )->type () == lexeme::Multiply) {
6578
6579
type->dereference_of = &curr ();
6579
6580
for (int i = 1 ; peek (i)->type () == lexeme::Multiply; ++i)
@@ -6778,7 +6779,7 @@ class parser
6778
6779
return {};
6779
6780
}
6780
6781
if (
6781
- t->is_wildcard ()
6782
+ t->is_wildcard ()
6782
6783
|| ( t->get_token () && t->get_token ()->to_string (true ) == " auto" )
6783
6784
) {
6784
6785
errors.emplace_back (
0 commit comments