Skip to content

Commit

Permalink
parse ... as a type, to allow va args inline methods
Browse files Browse the repository at this point in the history
this is a hack but it seems to work
  • Loading branch information
matcool committed Dec 20, 2024
1 parent 9ea686e commit 4243065
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ using namespace tao::pegtl;
namespace broma {
/// @brief A C++ type declaration.
struct type_content :
if_then_must<
pad_space<sor<keyword_const, keyword_struct>>,
if_then_else<
at<ellipsis>,
ellipsis,
if_then_must<
pad_space<sor<keyword_const, keyword_struct>>,

sor<pad_space<keyword_const>, pad_space<keyword_struct>, success>,
sor<pad_space<keyword_const>, pad_space<keyword_struct>, success>,

if_then_else<pad_space<keyword_unsigned>, opt<qualified>, qualified>,
if_then_else<pad_space<keyword_unsigned>, opt<qualified>, qualified>,

opt<rpad_space<keyword_const>>,
star<seq<sep, one<'&', '*'>>>
opt<rpad_space<keyword_const>>,
star<seq<sep, one<'&', '*'>>>
>
> {};

/// @brief A C++ type declaration, with starting whitespace.
Expand Down

0 comments on commit 4243065

Please sign in to comment.