souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
40 class TypeCast :
public Argument {
75 void print(std::ostream& os)
const override {
79 bool equal(
const Node& node)
const override {
80 const auto& other =
static_cast<const TypeCast&
>(node);
TypeCast * clone() const override
Create clone.
TypeCast(Own< Argument > value, QualifiedName type, SrcLocation loc={})
Own< Argument > value
Casted value.
void setType(const QualifiedName &type)
Set cast type.
An abstract class for manipulating AST Nodes by substitution.
const QualifiedName & getType() const
Return cast type.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
bool equal(const Node &node) const override
Abstract equality check for two AST nodes.
An abstract class for arguments.
auto clone(const std::vector< A * > &xs)
Defines a type cast class for expressions.
void print(std::ostream &os) const override
Output to a given output stream.
bool equal_ptr(const T *a, const T *b)
Compares two values referenced by a pointer where the case where both pointers are null is also consi...
std::vector< const Node * > getChildNodes() const override
Obtain a list of all embedded AST child nodes.
QualifiedName type
Cast type.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
virtual std::vector< const Node * > getChildNodes() const
Obtain a list of all embedded AST child nodes.
Abstract class for syntactic elements in an input program.
Argument * getValue() const
Return value.
const SrcLocation & getSrcLoc() const
Return source location of the Node.
Qualified Name class defines fully/partially qualified names to identify objects in components.