1 #ifndef ARGUMENT_LIST_H
2 #define ARGUMENT_LIST_H
76 template<
class CharSeq>
83 return parameter_list_base::operator==(other) &&
90 return !(*
this == other);
100 template<
class CharSeq>
114 (*_expand_flags)[n] = expandable;
129 (*_expand_flags)[n] :
false;
134 using parameter_list_base::none;
135 using parameter_list_base::empty_param;
136 using parameter_list_base::unclosed;
146 return ch && ch !=
',' && ch !=
'(' && ch !=
')';
160 bool append(std::string
const & arg);
size_t size() const
Get the number of parameters in the parameter_list_base
bool operator==(argument_list const &other) const
Equality.
static bool is_valid_char(char ch)
Say whether a character can validly appear in a member of an argument list.
template struct innards::parameter_list_base<Tag> generically defines a common interface of types rep...
argument_list(parameter_list_base const &parms)
Explicitly construct from an innards::parameter_list_base
Class argument_list encapsulates a list of macro arguments, i.e. the arguments to a macro reference...
bool is_expandable(size_t n) const
Say whether the nth argument, if any, is eligible for macro expansion.
parameter_list_base(size_t n=0)
Constructor for n parameters.
argument_list(chewer< CharSeq > &chew)
Explicitly construct from a chewer<CharSeq>
bool operator!=(argument_list const &other) const
Inequality.
std::shared_ptr< std::vector< bool > > _expand_flags
void read(chewer< CharSeq > &chew)
Read the argument_list from a chewer<CharSeq>
argument_list(size_t n=0)
Construct for n arguments.
`template struct chewer<CharSeq> is a cursor-like type that is associated with a character-sequence t...
bool set_expandable(size_t n, bool expandable=false)
Set the nth expand-flag to indicate whether the nth argument, if any, is eligible for macro expansion...
bool append(std::string const &arg)
Append an argument to the argument list.