Eval
- Added support for compiled expressions that are compiled once and evaluated multiple times in different contexts.
This commit is contained in:
@@ -44,6 +44,8 @@ public:
|
||||
void addSource (bool (*fn)(const std::string&, Variant&));
|
||||
void evaluateInfixExpression (const std::string&, Variant&) const;
|
||||
void evaluatePostfixExpression (const std::string&, Variant&) const;
|
||||
void compileExpression (const std::string&);
|
||||
void evaluateCompiledExpression (Variant&);
|
||||
void ambiguity (bool);
|
||||
void debug ();
|
||||
|
||||
@@ -69,6 +71,7 @@ private:
|
||||
std::vector <bool (*)(const std::string&, Variant&)> _sources;
|
||||
bool _ambiguity;
|
||||
bool _debug;
|
||||
std::vector <std::pair <std::string, Lexer::Type> > _compiled;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user