renamed "ignored" flag to "process" in token definitions
This commit is contained in:
parent
953796ec23
commit
b90b83ab0f
@ -71,7 +71,7 @@ refptr<string> Parser::buildTokenList()
|
||||
*tokenlist += " ";
|
||||
*tokenlist += "{ \"" + m_tokens[i]->getName() + "\", \""
|
||||
+ m_tokens[i]->getCString() + "\", "
|
||||
+ (m_tokens[i]->getIgnored() ? "true" : "false") + " }";
|
||||
+ (m_tokens[i]->getProcessFlag() ? "true" : "false") + " }";
|
||||
if (i < m_tokens.size() - 1)
|
||||
*tokenlist += ", \\\n";
|
||||
}
|
||||
@ -232,6 +232,7 @@ bool Parser::parseInputFile(char * buff, int size)
|
||||
if (ovector[8] >= 0 && ovector[9] >= 0
|
||||
&& ovector[9] - ovector[8] > 0)
|
||||
{
|
||||
td->setProcessFlag(true);
|
||||
code = ""; /* FIXME: function definition */
|
||||
gathering_code = true;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ static string c_escape(const string & orig)
|
||||
|
||||
|
||||
TokenDefinition::TokenDefinition()
|
||||
: m_ignored(false)
|
||||
: m_process(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -76,9 +76,9 @@ bool TokenDefinition::create(const string & name,
|
||||
{
|
||||
(*parts)[i] = trim((*parts)[i]);
|
||||
string & s = (*parts)[i];
|
||||
if (s == "i")
|
||||
if (s == "p")
|
||||
{
|
||||
m_ignored = true;
|
||||
m_process = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -12,12 +12,13 @@ class TokenDefinition
|
||||
const std::string & definition, const std::string & flags);
|
||||
std::string getCString() const;
|
||||
std::string getName() const { return m_name; }
|
||||
bool getIgnored() const { return m_ignored; }
|
||||
bool getProcessFlag() const { return m_process; }
|
||||
void setProcessFlag(bool p) { m_process = p; }
|
||||
|
||||
protected:
|
||||
std::string m_name;
|
||||
std::string m_definition;
|
||||
bool m_ignored;
|
||||
bool m_process;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@ bool I_CLASSNAME::parse(istream & i)
|
||||
struct {
|
||||
const char * name;
|
||||
const char * definition;
|
||||
bool ignored;
|
||||
bool process;
|
||||
pcre * re;
|
||||
pcre_extra * re_extra;
|
||||
} tokens[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user