mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Remove dead ComponentClass::{get,set}FirstChar
This commit is contained in:
parent
9a7b912a5d
commit
b1f6a539c7
@ -420,7 +420,7 @@ unique_ptr<ComponentClass> getLiteralComponentClass(unsigned char c,
|
|||||||
|
|
||||||
ComponentClass::ComponentClass(const ParseMode &mode_in)
|
ComponentClass::ComponentClass(const ParseMode &mode_in)
|
||||||
: m_negate(false), mode(mode_in), in_cand_range(false),
|
: m_negate(false), mode(mode_in), in_cand_range(false),
|
||||||
range_start(INVALID_UNICODE), finalized(false), firstChar('\0') {}
|
range_start(INVALID_UNICODE), finalized(false) {}
|
||||||
|
|
||||||
ComponentClass::~ComponentClass() { }
|
ComponentClass::~ComponentClass() { }
|
||||||
|
|
||||||
|
@ -245,9 +245,6 @@ public:
|
|||||||
|
|
||||||
bool isNegated() const { return m_negate; }
|
bool isNegated() const { return m_negate; }
|
||||||
|
|
||||||
void setFirstChar(char c) { firstChar = c; }
|
|
||||||
char getFirstChar() const { return firstChar; }
|
|
||||||
|
|
||||||
std::vector<PositionInfo> first() const override = 0;
|
std::vector<PositionInfo> first() const override = 0;
|
||||||
std::vector<PositionInfo> last() const override = 0;
|
std::vector<PositionInfo> last() const override = 0;
|
||||||
bool empty() const override { return false; } /* always 1 codepoint wide */
|
bool empty() const override { return false; } /* always 1 codepoint wide */
|
||||||
@ -263,19 +260,13 @@ protected:
|
|||||||
unichar range_start;
|
unichar range_start;
|
||||||
bool finalized;
|
bool finalized;
|
||||||
|
|
||||||
/** Literal character at the start of this character class, e.g. '.' for
|
|
||||||
* the class [.abc]. Used to identify (unsupported) POSIX collating
|
|
||||||
* elements. */
|
|
||||||
char firstChar;
|
|
||||||
|
|
||||||
virtual void createRange(unichar) = 0;
|
virtual void createRange(unichar) = 0;
|
||||||
|
|
||||||
// Protected copy ctor. Use clone instead.
|
// Protected copy ctor. Use clone instead.
|
||||||
ComponentClass(const ComponentClass &other)
|
ComponentClass(const ComponentClass &other)
|
||||||
: Component(other), m_negate(other.m_negate), mode(other.mode),
|
: Component(other), m_negate(other.m_negate), mode(other.mode),
|
||||||
in_cand_range(other.in_cand_range), range_start(other.range_start),
|
in_cand_range(other.in_cand_range), range_start(other.range_start),
|
||||||
finalized(other.finalized),
|
finalized(other.finalized) {}
|
||||||
firstChar(other.firstChar) {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ue2
|
} // namespace ue2
|
||||||
|
@ -1094,9 +1094,6 @@ unichar readUtf8CodePoint4c(const u8 *ts) {
|
|||||||
|
|
||||||
# Literal character
|
# Literal character
|
||||||
(any - ']') => {
|
(any - ']') => {
|
||||||
if (currentCls->class_empty()) {
|
|
||||||
currentCls->setFirstChar(*ts);
|
|
||||||
}
|
|
||||||
currentCls->add(*ts);
|
currentCls->add(*ts);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user