Result of evaluation is only printed when it's not nil
This commit is contained in:
parent
e2142d9dbd
commit
741eb7f576
@ -66,7 +66,9 @@ struct Runner
|
||||
dump(ast);
|
||||
return {};
|
||||
}
|
||||
std::cout << Try(interpreter.eval(std::move(ast))) << std::endl;
|
||||
if (auto result = Try(interpreter.eval(std::move(ast))); result.type != Value::Type::Nil) {
|
||||
std::cout << result << std::endl;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user