#include "evaluate.h" #include "../../defs/defs.h" #include "../../executor/executor.h" #include "../../data/data.h" Value evaluate(Value val) { if (val.valtype == ValueType::Processed) { if (val.processed) { return execute(*val.processed); } } else if (val.valtype == ValueType::Variable) { return data::getValue(val.varName.key); } return val; }