mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Grammar: Added Production::decorate to capture token decoration one day
This commit is contained in:
parent
d8e4946537
commit
29cb35123a
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue