An error occurred while loading the file. Please try again.
-
ilor authored
First draft of Match value type with some tests. MatchVector does not yet properly implement first/last token, hence a test fails, and AnnotationMatch is pretty much a stub.
5769ec06
matchvector.h 753 B
#ifndef LIBWCCL_VALUES_MATCHVECTOR_H
#define LIBWCCL_VALUES_MATCHVECTOR_H
#include <libwccl/values/match.h>
#include <boost/shared_ptr.hpp>
#include <vector>
namespace Wccl {
class MatchVector : public Match
{
public:
WCCL_VALUE_PREAMBLE
MatchVector()
{
}
/// Match override. A MatchVector is empty if it contains no sub-matches,
/// or if they are all empty.
bool empty() const;
/// Match override.
Position first_token() const;
/// Match override.
Position last_token() const;
/// Value override
std::string to_raw_string() const;
/// Append a sub-match
void append(const boost::shared_ptr<Match>& m);
private:
std::vector< boost::shared_ptr<Match> > matches_;
};
} /* end ns Wccl */
#endif // LIBWCCL_VALUES_MATCHVECTOR_H