UI: RuleTextParser: Add parseNot()

This commit is contained in:
Nodir Temirkhodjaev 2024-11-10 09:51:33 +05:00
parent 729b15c163
commit 6cd542b21f
2 changed files with 9 additions and 2 deletions

View File

@ -215,8 +215,7 @@ bool RuleTextParser::parseSectionChar()
return parseName(); return parseName();
} break; } break;
case CharNot: { case CharNot: {
m_ruleFilter.isNot = !m_ruleFilter.isNot; return parseNot();
return true;
} break; } break;
case CharColon: { case CharColon: {
m_ruleFilter.isSectionEnd = true; m_ruleFilter.isSectionEnd = true;
@ -308,6 +307,13 @@ bool RuleTextParser::parseName()
return true; return true;
} }
bool RuleTextParser::parseNot()
{
m_ruleFilter.isNot = !m_ruleFilter.isNot;
return true;
}
void RuleTextParser::parseBracketValues() void RuleTextParser::parseBracketValues()
{ {
RuleCharTypes expectedSeparator = CharNone; RuleCharTypes expectedSeparator = CharNone;

View File

@ -106,6 +106,7 @@ private:
bool checkListEnd(); bool checkListEnd();
bool parseName(); bool parseName();
bool parseNot();
void parseBracketValues(); void parseBracketValues();
bool parseBracketValue(RuleCharTypes expectedSeparator); bool parseBracketValue(RuleCharTypes expectedSeparator);