Remove unused boolean_t token type

This commit is contained in:
G.H.O.S.T 2024-12-30 14:35:02 +01:00
parent e37f8efd6e
commit 142c414603
Signed by: G.H.O.S.T
GPG Key ID: 3BD93EABD1407B82
4 changed files with 0 additions and 72 deletions

View File

@ -1,31 +0,0 @@
#include <code/query/boolean.hxx>
namespace code::query
{
boolean_t::
boolean_t(source_location_t origin, bool value)
: origin_{move(origin)}, value_{value}
{}
source_location_t const&
boolean_t::
origin() const
{
return origin_;
}
bool
boolean_t::
value() const
{
return value_;
}
string
to_string(boolean_t const& boolean)
{
return boolean.value() ? "true" : "false";
}
} // namespace code::query

View File

@ -1,32 +0,0 @@
#ifndef code__query__boolean_hxx_
#define code__query__boolean_hxx_
#include <code/query/source-location.hxx>
#include <code/query/types.hxx>
namespace code::query
{
class boolean_t
{
public:
boolean_t(source_location_t, bool);
source_location_t const&
origin() const;
bool
value() const;
private:
source_location_t origin_;
bool value_;
};
string
to_string(boolean_t const&);
} // namespace code::query
#endif

View File

@ -1,5 +1,4 @@
#include <code/query/match.hxx> #include <code/query/match.hxx>
#include <code/query/boolean.hxx>
#include <code/query/logical-and.hxx> #include <code/query/logical-and.hxx>
#include <code/query/logical-not.hxx> #include <code/query/logical-not.hxx>
#include <code/query/logical-or.hxx> #include <code/query/logical-or.hxx>
@ -15,7 +14,6 @@ namespace code::query
class matcher_t class matcher_t
: public visitor_t, : public visitor_t,
public basic_visitor_t<term_t>, public basic_visitor_t<term_t>,
public basic_visitor_t<boolean_t>,
public basic_visitor_t<tag_t>, public basic_visitor_t<tag_t>,
public basic_visitor_t<logical_and_t>, public basic_visitor_t<logical_and_t>,
public basic_visitor_t<logical_not_t>, public basic_visitor_t<logical_not_t>,
@ -60,12 +58,6 @@ namespace code::query
result = predicate_(e); result = predicate_(e);
} }
void
visit(boolean_t const& e) override
{
result = e.value();
}
void void
visit(logical_and_t const& e) override visit(logical_and_t const& e) override
{ {

View File

@ -1,4 +1,3 @@
#include <code/query/boolean.hxx>
#include <code/query/logical-and.hxx> #include <code/query/logical-and.hxx>
#include <code/query/logical-not.hxx> #include <code/query/logical-not.hxx>
#include <code/query/logical-or.hxx> #include <code/query/logical-or.hxx>