Skip to content
Snippets Groups Projects
Commit 22a190a1 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

cli: simplify the cli code a bit

parent 5d5dd3a0
No related branches found
No related tags found
1 merge request!223Merge jt
......@@ -16,8 +16,6 @@ public:
}
 
std::shared_ptr < abstraction::Value > translateAndEval ( Environment & environment ) const override {
std::shared_ptr < abstraction::Value > result;
ext::vector < std::shared_ptr < abstraction::Value > > params;
for ( const std::unique_ptr < Expression > & param : m_params ) {
std::shared_ptr < abstraction::Value > value = param->translateAndEval ( environment );
......
......@@ -12,11 +12,9 @@ public:
ImmediateExpression ( Type value ) : m_value ( std::move ( value ) ) {
}
 
std::shared_ptr < abstraction::Value > translateAndEval ( Environment & environment ) const override {
std::shared_ptr < abstraction::Value > translateAndEval ( Environment & ) const override {
Type copy = m_value;
std::shared_ptr < abstraction::ValueHolder < Type > > value = std::make_shared < abstraction::ValueHolder < Type > > ( std::move ( copy ), true );
environment.holdTemporary ( value );
return value;
return std::make_shared < abstraction::ValueHolder < Type > > ( std::move ( copy ), true );
}
 
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment