2016-11-23 04:41:38 +01:00
|
|
|
#ifndef __ANTHEM__CONTEXT_H
|
|
|
|
#define __ANTHEM__CONTEXT_H
|
|
|
|
|
2018-03-22 17:20:54 +01:00
|
|
|
#include <optional>
|
2017-06-01 04:05:11 +02:00
|
|
|
|
|
|
|
#include <anthem/AST.h>
|
2016-11-24 00:52:28 +01:00
|
|
|
#include <anthem/output/Logger.h>
|
2017-06-06 02:02:26 +02:00
|
|
|
#include <anthem/output/ParenthesisStyle.h>
|
2016-11-24 00:52:28 +01:00
|
|
|
|
2016-11-23 04:41:38 +01:00
|
|
|
namespace anthem
|
|
|
|
{
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Context
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-04-05 23:22:25 +02:00
|
|
|
struct PredicateSignatureMeta
|
|
|
|
{
|
|
|
|
ast::PredicateSignature predicateSignature;
|
|
|
|
bool used{false};
|
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-11-23 04:41:38 +01:00
|
|
|
struct Context
|
|
|
|
{
|
2017-05-30 03:53:51 +02:00
|
|
|
Context() = default;
|
|
|
|
|
|
|
|
explicit Context(output::Logger &&logger)
|
|
|
|
: logger{std::move(logger)}
|
2016-11-24 16:50:35 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-11-24 00:52:28 +01:00
|
|
|
output::Logger logger;
|
|
|
|
|
2017-06-06 01:44:44 +02:00
|
|
|
bool performSimplification = false;
|
|
|
|
bool performCompletion = false;
|
2017-06-01 04:05:11 +02:00
|
|
|
|
2018-04-05 23:22:25 +02:00
|
|
|
std::optional<std::vector<PredicateSignatureMeta>> visiblePredicateSignatures;
|
|
|
|
std::optional<std::vector<PredicateSignatureMeta>> externalPredicateSignatures;
|
2017-06-06 02:02:26 +02:00
|
|
|
|
|
|
|
ast::ParenthesisStyle parenthesisStyle = ast::ParenthesisStyle::Normal;
|
2016-11-23 04:41:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|