A3t
- Added ::getLimit to find the 'limit:n' pseudo attribute.
This commit is contained in:
20
src/A3t.cpp
20
src/A3t.cpp
@@ -588,6 +588,26 @@ const std::vector <std::string> A3t::getWords () const
|
||||
return words;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string A3t::getLimit () const
|
||||
{
|
||||
std::vector <Tree*>::const_iterator i;
|
||||
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
||||
{
|
||||
// Parser override operator.
|
||||
if ((*i)->attribute ("raw") == "TERMINATED")
|
||||
break;
|
||||
|
||||
if ((*i)->hasTag ("PSEUDO") &&
|
||||
(*i)->attribute ("name") == "limit")
|
||||
{
|
||||
return (*i)->attribute ("raw");
|
||||
}
|
||||
}
|
||||
|
||||
return "0";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// /pattern/ --> description ~ pattern
|
||||
void A3t::findPattern ()
|
||||
|
||||
Reference in New Issue
Block a user