mirror of
https://github.com/tnodir/fort
synced 2024-11-15 04:27:09 +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()
|
bool RuleTextParser::processSectionChar()
|
||||||
{
|
{
|
||||||
|
if ((m_charType & (CharListBegin | CharBracketBegin | CharDigit | CharValueBegin)) != 0) {
|
||||||
|
return processSectionBlock();
|
||||||
|
}
|
||||||
|
|
||||||
switch (m_charType) {
|
switch (m_charType) {
|
||||||
case CharListBegin: {
|
|
||||||
processSectionLines();
|
|
||||||
} break;
|
|
||||||
case CharBracketBegin: {
|
|
||||||
parseBracketValues();
|
|
||||||
} break;
|
|
||||||
case CharDigit:
|
|
||||||
case CharValueBegin: {
|
|
||||||
parseValue();
|
|
||||||
} break;
|
|
||||||
case CharLetter: {
|
case CharLetter: {
|
||||||
return parseName();
|
return parseName();
|
||||||
} break;
|
} break;
|
||||||
@ -179,6 +173,24 @@ bool RuleTextParser::processSectionChar()
|
|||||||
return false;
|
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()
|
void RuleTextParser::processSectionLines()
|
||||||
{
|
{
|
||||||
parseLines();
|
parseLines();
|
||||||
|
@ -74,6 +74,7 @@ private:
|
|||||||
bool parseLine();
|
bool parseLine();
|
||||||
bool parseLineSection();
|
bool parseLineSection();
|
||||||
bool processSectionChar();
|
bool processSectionChar();
|
||||||
|
bool processSectionBlock();
|
||||||
void processSectionLines();
|
void processSectionLines();
|
||||||
|
|
||||||
bool parseName();
|
bool parseName();
|
||||||
|
Loading…
Reference in New Issue
Block a user