File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -555,7 +555,7 @@ struct type_id_node
555
555
break ;case empty:
556
556
return {};
557
557
break ;case qualified:
558
- return get<qualified>(id)-> get_token () ;
558
+ return {} ;
559
559
break ;case unqualified:
560
560
return get<unqualified>(id)->get_token ();
561
561
break ;case keyword:
@@ -2337,10 +2337,10 @@ class parser
2337
2337
// Remember current position, because we need to look ahead to the next ::
2338
2338
auto start_pos = pos;
2339
2339
2340
- // If we don't get a first id, or if the next thing isn 't :: or .,
2341
- // back out and report unsuccessful
2340
+ // If we don't get a first id, or if we didn 't have a leading :: and
2341
+ // the next thing isn't :: or ., back out and report unsuccessful
2342
2342
term.id = unqualified_id ();
2343
- if (!term.id || curr ().type () != lexeme::Scope) {
2343
+ if (!term.id || (!term. scope_op && curr ().type () != lexeme::Scope) ) {
2344
2344
pos = start_pos; // backtrack
2345
2345
return {};
2346
2346
}
@@ -2352,7 +2352,6 @@ class parser
2352
2352
2353
2353
n->ids .push_back ( std::move (term) );
2354
2354
2355
- assert (curr ().type () == lexeme::Scope);
2356
2355
while (curr ().type () == lexeme::Scope)
2357
2356
{
2358
2357
auto term = qualified_id_node::term{ &curr () };
You can’t perform that action at this time.
0 commit comments