Remove unused boolean_t
token type
This commit is contained in:
parent
e37f8efd6e
commit
142c414603
@ -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
|
@ -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
|
@ -1,5 +1,4 @@
|
||||
#include <code/query/match.hxx>
|
||||
#include <code/query/boolean.hxx>
|
||||
#include <code/query/logical-and.hxx>
|
||||
#include <code/query/logical-not.hxx>
|
||||
#include <code/query/logical-or.hxx>
|
||||
@ -15,7 +14,6 @@ namespace code::query
|
||||
class matcher_t
|
||||
: public visitor_t,
|
||||
public basic_visitor_t<term_t>,
|
||||
public basic_visitor_t<boolean_t>,
|
||||
public basic_visitor_t<tag_t>,
|
||||
public basic_visitor_t<logical_and_t>,
|
||||
public basic_visitor_t<logical_not_t>,
|
||||
@ -60,12 +58,6 @@ namespace code::query
|
||||
result = predicate_(e);
|
||||
}
|
||||
|
||||
void
|
||||
visit(boolean_t const& e) override
|
||||
{
|
||||
result = e.value();
|
||||
}
|
||||
|
||||
void
|
||||
visit(logical_and_t const& e) override
|
||||
{
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <code/query/boolean.hxx>
|
||||
#include <code/query/logical-and.hxx>
|
||||
#include <code/query/logical-not.hxx>
|
||||
#include <code/query/logical-or.hxx>
|
||||
|
Loading…
x
Reference in New Issue
Block a user