#ifndef LIBWCCL_VALUES_MATCH_H #define LIBWCCL_VALUES_MATCH_H #include <libwccl/values/position.h> namespace Wccl { class Match : public Value { public: WCCL_VALUE_PREAMBLE Match() { } /** * Check if the match is empty (matches nothing). Match objects themselves * are by definition empty, child classes are sometimes or always non-empty. */ virtual bool empty() const { return true; } /** * Getter for the first token matched. If the match is empty, must return * Nowhere. */ virtual Position first_token() const { return Position(Position::Nowhere); } /** * Getter for the last token matched. If the match is empty, must return * Nowhere. */ virtual Position last_token() const { return Position(Position::Nowhere); } /// Value override std::string to_raw_string() const; }; } /* end ns Wccl */ #endif // LIBWCCL_VALUES_MATCH_H