ExpressionParser: Add support for simple barewords control names

If an expression can't be parsed normally, we then look to see if it's a
simple device name. This keeps backwards compatibility with simple input
ocnfigurations, where people just used the Detect button.
This commit is contained in:
Jasper St. Pierre
2013-06-26 20:19:23 -04:00
parent 03fdebac09
commit f53eefb491
2 changed files with 60 additions and 29 deletions

View File

@ -41,22 +41,18 @@ private:
bool is_input;
};
class Parser;
class ExpressionNode;
class Expression
{
friend class Parser;
public:
Expression() : expr(NULL) {}
Expression() : node(NULL) {}
Expression(ExpressionNode *node);
~Expression();
ControlState GetValue();
void SetValue (ControlState state);
int num_controls;
bool is_complicated;
private:
ExpressionNode *expr;
ExpressionNode *node;
};
enum ExpressionParseStatus