souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
49 class AlgebraicDataType :
public Type {
53 assert(!this->branches.empty());
56 std::vector<BranchDeclaration*>
getBranches()
const {
60 void print(std::ostream& os)
const override {
69 bool equal(
const Node& node)
const override {
71 return getQualifiedName() == other.getQualifiedName() &&
branches == other.branches;
bool equal(const Node &node) const override
void print(std::ostream &os) const override
VecOwn< BranchDeclaration > branches
The list of branches for this sum type.
auto clone(const std::vector< A * > &xs)
detail::joined_sequence< Iter, Printer > join(const Iter &a, const Iter &b, const std::string &sep, const Printer &p)
Creates an object to be forwarded to some output stream for printing sequences of elements interspers...
AlgebraicDataType(QualifiedName name, VecOwn< BranchDeclaration > branches, SrcLocation loc={})
AlgebraicDataType * clone() const override
std::vector< BranchDeclaration * > getBranches() const
Type(const Type &other)=delete
Abstract class for syntactic elements in an input program.
std::vector< T * > toPtrVector(const std::vector< std::unique_ptr< T >> &v)
A utility function enabling the creation of a vector of pointers.
std::vector< Own< A > > VecOwn
Combination of types using sums and products.