mirror of
https://github.com/tnodir/fort
synced 2024-11-14 22:05:12 +00:00
UI: RuleTextParser: Simplify processSectionChar()
This commit is contained in:
parent
1150a45f55
commit
f4683f5b5b
@ -149,17 +149,11 @@ bool RuleTextParser::parseLineSection()
|
||||
|
||||
bool RuleTextParser::processSectionChar()
|
||||
{
|
||||
if ((m_charType & (CharListBegin | CharBracketBegin | CharDigit | CharValueBegin)) != 0) {
|
||||
return processSectionBlock();
|
||||
}
|
||||
|
||||
switch (m_charType) {
|
||||
case CharListBegin: {
|
||||
processSectionLines();
|
||||
} break;
|
||||
case CharBracketBegin: {
|
||||
parseBracketValues();
|
||||
} break;
|
||||
case CharDigit:
|
||||
case CharValueBegin: {
|
||||
parseValue();
|
||||
} break;
|
||||
case CharLetter: {
|
||||
return parseName();
|
||||
} break;
|
||||
@ -179,6 +173,24 @@ bool RuleTextParser::processSectionChar()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RuleTextParser::processSectionBlock()
|
||||
{
|
||||
switch (m_charType) {
|
||||
case CharListBegin: {
|
||||
processSectionLines();
|
||||
} break;
|
||||
case CharBracketBegin: {
|
||||
parseBracketValues();
|
||||
} break;
|
||||
case CharDigit:
|
||||
case CharValueBegin: {
|
||||
parseValue();
|
||||
} break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void RuleTextParser::processSectionLines()
|
||||
{
|
||||
parseLines();
|
||||
|
@ -74,6 +74,7 @@ private:
|
||||
bool parseLine();
|
||||
bool parseLineSection();
|
||||
bool processSectionChar();
|
||||
bool processSectionBlock();
|
||||
void processSectionLines();
|
||||
|
||||
bool parseName();
|
||||
|
Loading…
Reference in New Issue
Block a user