souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
37 virtual ~Node() =
default;
50 std::string
extloc()
const {
58 }
else if (
typeid(*
this) ==
typeid(*&other)) {
66 return !(*
this == other);
81 friend std::ostream&
operator<<(std::ostream& out,
const Node& node) {
88 virtual void print(std::ostream& os)
const = 0;
bool operator==(const Node &other) const
Equivalence check for two AST nodes.
An abstract class for manipulating AST Nodes by substitution.
SrcLocation location
Source location of a syntactic element.
virtual void print(std::ostream &os) const =0
Output to a given output stream.
std::string extloc() const
Return source location of the syntactic element.
bool operator!=(const Node &other) const
Inequality check for two AST nodes.
friend std::ostream & operator<<(std::ostream &out, const Node &node)
Print node onto an output stream.
virtual Node * clone() const =0
Create a clone (i.e.
virtual std::vector< const Node * > getChildNodes() const
Obtain a list of all embedded AST child nodes.
virtual bool equal(const Node &) const
Abstract equality check for two AST nodes.
Abstract class for syntactic elements in an input program.
A class describing a range in an input file.
void setSrcLoc(SrcLocation l)
Set source location for the Node.
const SrcLocation & getSrcLoc() const
Return source location of the Node.
virtual void apply(const NodeMapper &)
Apply the mapper to all child nodes.
std::string extloc() const
An extended string describing this location in a end-user friendly way.