Skip to content

Commit 8f13c29

Browse files
committed
refactor: add expression_list_node::type_id_term
1 parent 73f8b3d commit 8f13c29

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

source/parse.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,8 @@ auto to_string_view(passing_style pass) -> std::string_view {
694694
}
695695

696696

697+
struct type_id_node;
698+
697699
struct expression_list_node
698700
{
699701
token const* open_paren = {};
@@ -713,6 +715,12 @@ struct expression_list_node
713715
v.end(*this, depth);
714716
}
715717
};
718+
struct type_id_term {
719+
bool has_disambiguating_type = {};
720+
std::unique_ptr<type_id_node> type;
721+
722+
auto visit(auto& v, int depth) -> void;
723+
};
716724
std::vector< expression_term > arguments;
717725

718726

@@ -1174,7 +1182,6 @@ auto prefix_expression_node::visit(auto& v, int depth)
11741182
}
11751183

11761184

1177-
struct type_id_node;
11781185
struct template_args_tag { };
11791186

11801187
struct template_argument
@@ -1513,6 +1520,14 @@ auto template_argument::to_string() const
15131520
return {};
15141521
}
15151522

1523+
auto expression_list_node::type_id_term::visit(auto& v, int depth) -> void
1524+
{
1525+
v.start(*this, depth);
1526+
assert(type);
1527+
type->visit(v, depth+1);
1528+
v.end(*this, depth);
1529+
}
1530+
15161531

15171532
struct is_as_expression_node
15181533
{

0 commit comments

Comments
 (0)