souffle
2.0.2-371-g6315b36
|
Abstract constant class. More...
#include <Constant.h>
Public Member Functions | |
Constant * | clone () const override=0 |
Create clone. More... | |
const std::string & | getConstant () const |
Get string representation of Constant. More... | |
Public Member Functions inherited from souffle::ast::Argument | |
Node (SrcLocation loc={}) | |
Public Member Functions inherited from souffle::ast::Node | |
virtual void | apply (const NodeMapper &) |
Apply the mapper to all child nodes. More... | |
std::string | extloc () const |
Return source location of the syntactic element. More... | |
virtual std::vector< const Node * > | getChildNodes () const |
Obtain a list of all embedded AST child nodes. More... | |
const SrcLocation & | getSrcLoc () const |
Return source location of the Node. More... | |
Node (SrcLocation loc={}) | |
bool | operator!= (const Node &other) const |
Inequality check for two AST nodes. More... | |
bool | operator== (const Node &other) const |
Equivalence check for two AST nodes. More... | |
void | setSrcLoc (SrcLocation l) |
Set source location for the Node. More... | |
virtual | ~Node ()=default |
Protected Member Functions | |
Constant (std::string value, SrcLocation loc={}) | |
bool | equal (const Node &node) const override |
Abstract equality check for two AST nodes. More... | |
void | print (std::ostream &os) const override |
Output to a given output stream. More... | |
Private Attributes | |
const std::string | constant |
String representation of constant. More... | |
Abstract constant class.
Definition at line 38 of file Constant.h.
|
inlineprotected |
Definition at line 57 of file Constant.h.
|
overridepure virtual |
Create clone.
Implements souffle::ast::Argument.
Implemented in souffle::ast::NumericConstant, souffle::ast::StringConstant, and souffle::ast::NilConstant.
|
inlineoverrideprotectedvirtual |
Abstract equality check for two AST nodes.
Reimplemented from souffle::ast::Node.
Reimplemented in souffle::ast::NumericConstant.
Definition at line 52 of file Constant.h.
Referenced by souffle::ast::NumericConstant::getFixedType().
|
inline |
Get string representation of Constant.
Definition at line 43 of file Constant.h.
Referenced by souffle::ast::StringConstant::clone(), and souffle::ast::analysis::TypeConstraintsAnalysis::visitNumericConstant().
|
inlineoverrideprotectedvirtual |
Output to a given output stream.
Implements souffle::ast::Node.
Reimplemented in souffle::ast::StringConstant.
Definition at line 48 of file Constant.h.
|
private |
String representation of constant.
Definition at line 58 of file Constant.h.