File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -871,7 +871,7 @@ class cppfront
871
871
class current_functions_
872
872
{
873
873
std::vector<function_info> list = { {} };
874
- const int MaxNestedFunctions = 100 ; // see the next comment and the assertion:
874
+ const size_t MaxNestedFunctions = 100 ; // see the next comment and the assertion:
875
875
public:
876
876
current_functions_ () {
877
877
list.reserve (MaxNestedFunctions); // (1) for pointer stability / lifetime safety
Original file line number Diff line number Diff line change @@ -1224,7 +1224,7 @@ auto lex_line(
1224
1224
// G decimal-literal ''' digit [uU][lL][lL]
1225
1225
// G
1226
1226
// G floating-point-literal:
1227
- // G digit { ' | digit }* ( . digit { ' | digit }*)? ([eE][-+]?digit { ' | digit }*) [fFlL]
1227
+ // G digit { ' | digit }* . digit ( { ' | digit }*)? ([eE][-+]?digit { ' | digit }*) [fFlL]
1228
1228
// G
1229
1229
// G TODO full grammar & refactor to utility functions with their
1230
1230
// G own unit test rather than inline everything here
@@ -1247,7 +1247,7 @@ auto lex_line(
1247
1247
// and be error checked. Best would be to slurp all
1248
1248
// [a-zA-Z] and then validate against a list of
1249
1249
// allowed suffixes. Ideally handle the C++23 size
1250
- // suffixes aswell .
1250
+ // suffixes as well .
1251
1251
if (peek (j) == ' u' || peek (j) == ' U' ) { ++j; }
1252
1252
if (peek (j) == ' l' || peek (j) == ' L' ) { ++j; }
1253
1253
if (peek (j) == ' l' || peek (j) == ' L' ) { ++j; }
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ auto is_assignment_operator(lexeme l)
102
102
//
103
103
104
104
// -----------------------------------------------------------------------
105
- // try_emit
105
+ // try_visit
106
106
//
107
107
// Helper to visit whatever is in a variant where each
108
108
// alternative is a smart pointer
@@ -4667,12 +4667,12 @@ class parser
4667
4667
4668
4668
// So we can create the typeid_id_node and its unqualified_id_node
4669
4669
4670
- auto id = std::make_unique<unqualified_id_node>();
4671
- id ->identifier = &generated_tokens_->back ();
4670
+ auto gen_id = std::make_unique<unqualified_id_node>();
4671
+ gen_id ->identifier = &generated_tokens_->back ();
4672
4672
4673
4673
auto type = std::make_unique<type_id_node>();
4674
4674
type->pos = start;
4675
- type->id = std::move (id );
4675
+ type->id = std::move (gen_id );
4676
4676
4677
4677
n->type = std::move (type);
4678
4678
assert (n->is_object ());
You can’t perform that action at this time.
0 commit comments