refactor: FilterParser (#4925)
* Make explainIllType anonymous/static * Comment constructor
This commit is contained in:
@@ -9,7 +9,9 @@
|
|||||||
#include "controllers/filters/lang/Filter.hpp"
|
#include "controllers/filters/lang/Filter.hpp"
|
||||||
#include "controllers/filters/lang/Types.hpp"
|
#include "controllers/filters/lang/Types.hpp"
|
||||||
|
|
||||||
namespace chatterino::filters {
|
namespace {
|
||||||
|
|
||||||
|
using namespace chatterino::filters;
|
||||||
|
|
||||||
QString explainIllType(const IllTyped &ill)
|
QString explainIllType(const IllTyped &ill)
|
||||||
{
|
{
|
||||||
@@ -18,6 +20,10 @@ QString explainIllType(const IllTyped &ill)
|
|||||||
.arg(ill.expr->filterString());
|
.arg(ill.expr->filterString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
namespace chatterino::filters {
|
||||||
|
|
||||||
FilterParser::FilterParser(const QString &text)
|
FilterParser::FilterParser(const QString &text)
|
||||||
: text_(text)
|
: text_(text)
|
||||||
, tokenizer_(Tokenizer(text))
|
, tokenizer_(Tokenizer(text))
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ namespace chatterino::filters {
|
|||||||
class FilterParser
|
class FilterParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Take input text & attempt to parse it into a filter
|
||||||
|
**/
|
||||||
FilterParser(const QString &text);
|
FilterParser(const QString &text);
|
||||||
|
|
||||||
bool valid() const;
|
bool valid() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user