Fix parser error on free text operator

This commit is contained in:
Felipe Zimmerle 2016-02-18 10:11:54 -03:00
parent 1f68075a28
commit f44143436b

View File

@ -397,7 +397,10 @@ op:
}
| FREE_TEXT
{
Operator *op = Operator::instantiate("\"@rx " + $1 + "\"");
std::string text = std::string($1);
text.pop_back();
text.erase(0, 1);
Operator *op = Operator::instantiate("\"@rx " + text + "\"");
const char *error = NULL;
if (op->init(driver.ref.back(), &error) == false) {
driver.error(@0, error);