- ::findPattern now creates sub nodes.
This commit is contained in:
Paul Beckingham 2014-05-20 18:23:25 -04:00
parent 623b1619df
commit 922b80a5be

View file

@ -748,7 +748,7 @@ const std::vector <std::string> A3t::getWords () const
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// /pattern/ // /pattern/ --> description ~ pattern
void A3t::findPattern () void A3t::findPattern ()
{ {
std::vector <Tree*>::iterator i; std::vector <Tree*>::iterator i;
@ -770,7 +770,17 @@ void A3t::findPattern ()
{ {
(*i)->unTag ("?"); (*i)->unTag ("?");
(*i)->tag ("PATTERN"); (*i)->tag ("PATTERN");
(*i)->attribute ("pattern", pattern); (*i)->tag ("EXPANDED");
Tree* branch = (*i)->addBranch (new Tree ("argPat"));
branch->attribute ("value", "description");
branch = (*i)->addBranch (new Tree ("argPat"));
branch->attribute ("value", "~");
branch->tag ("OP");
branch = (*i)->addBranch (new Tree ("argPat"));
branch->attribute ("value", pattern);
} }
} }
} }