Grammar: Added Production::decorate to capture token decoration one day

This commit is contained in:
Paul Beckingham 2015-12-22 07:50:04 -05:00
parent d8e4946537
commit 29cb35123a
2 changed files with 4 additions and 0 deletions

View file

@ -111,6 +111,8 @@ void Grammar::loadFromString (const std::string& input)
}
else if (token.front () == ':')
{
// TODO Handle decorated tokens here.
_rules[rule_name].back ().decorate (token);
}
else
{

View file

@ -43,6 +43,8 @@ public:
protected:
class Production : public std::vector <std::string>
{
public:
void decorate (const std::string& value) {}
};
class Rule : public std::vector <Production>