Fixed missing usages of new output format.

This commit is contained in:
Patrick Lühne 2016-11-24 03:36:14 +01:00
parent e2a450daa6
commit c760edb141
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
3 changed files with 5 additions and 3 deletions

View File

@ -90,7 +90,7 @@ struct TermPrintVisitor
outputStream << " " << Clingo::AST::BinaryOperator::And << " "; outputStream << " " << Clingo::AST::BinaryOperator::And << " ";
if (literal.sign == Clingo::AST::Sign::Negation) if (literal.sign == Clingo::AST::Sign::Negation)
std::cout << Clingo::AST::Sign::Negation << " "; outputStream << Clingo::AST::Sign::Negation << " ";
outputStream << output::Function(function.name) << "("; outputStream << output::Function(function.name) << "(";

View File

@ -19,7 +19,8 @@ struct StatementVisitor
{ {
void visit(const Clingo::AST::Program &program, const Clingo::AST::Statement &statement, Context &context) void visit(const Clingo::AST::Program &program, const Clingo::AST::Statement &statement, Context &context)
{ {
context.logger.log(output::Priority::Debug, program.name); // TODO: refactor
context.logger.log(output::Priority::Debug, (std::string("[program] ") + program.name).c_str());
if (!program.parameters.empty()) if (!program.parameters.empty())
throwErrorAtLocation(statement.location, "program parameters currently unsupported", context); throwErrorAtLocation(statement.location, "program parameters currently unsupported", context);

View File

@ -32,7 +32,8 @@ void translate(const std::vector<std::string> &fileNames, Context &context)
void translate(const char *fileName, std::istream &stream, Context &context) void translate(const char *fileName, std::istream &stream, Context &context)
{ {
std::cout << "info: reading " << fileName << std::endl; // TODO: refactor
context.logger.log(output::Priority::Note, (std::string("reading ") + fileName).c_str());
auto fileContent = std::string(std::istreambuf_iterator<char>(stream), {}); auto fileContent = std::string(std::istreambuf_iterator<char>(stream), {});