souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions | Protected Attributes
souffle::ast::Pragma Class Reference

Representation of a global option. More...

#include <Pragma.h>

Inheritance diagram for souffle::ast::Pragma:
Inheritance graph
Collaboration diagram for souffle::ast::Pragma:
Collaboration graph

Public Member Functions

Pragmaclone () const override
 Create a clone (i.e. More...
 
std::pair< std::string, std::string > getkvp () const
 
 Pragma (std::string key, std::string value, 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 SrcLocationgetSrcLoc () 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

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...
 

Protected Attributes

std::string key
 Name of the key. More...
 
std::string value
 Value. More...
 

Detailed Description

Representation of a global option.

Definition at line 37 of file Pragma.h.

Constructor & Destructor Documentation

◆ Pragma()

souffle::ast::Pragma::Pragma ( std::string  key,
std::string  value,
SrcLocation  loc = {} 
)
inline

Definition at line 39 of file Pragma.h.

Member Function Documentation

◆ clone()

Pragma* souffle::ast::Pragma::clone ( ) const
inlineoverridevirtual

Create a clone (i.e.

deep copy) of this node

Implements souffle::ast::Node.

Definition at line 42 of file Pragma.h.

45  :
46  void print(std::ostream& os) const override {

◆ equal()

bool souffle::ast::Pragma::equal ( const Node ) const
inlineoverrideprotectedvirtual

Abstract equality check for two AST nodes.

Reimplemented from souffle::ast::Node.

Definition at line 56 of file Pragma.h.

◆ getkvp()

std::pair<std::string, std::string> souffle::ast::Pragma::getkvp ( ) const
inline

Definition at line 47 of file Pragma.h.

50  {

◆ print()

void souffle::ast::Pragma::print ( std::ostream &  os) const
inlineoverrideprotectedvirtual

Output to a given output stream.

Implements souffle::ast::Node.

Definition at line 52 of file Pragma.h.

Field Documentation

◆ key

std::string souffle::ast::Pragma::key
protected

Name of the key.

Definition at line 62 of file Pragma.h.

◆ value

std::string souffle::ast::Pragma::value
protected

Value.

Definition at line 65 of file Pragma.h.


The documentation for this class was generated from the following file:
souffle::ast::Pragma::print
void print(std::ostream &os) const override
Output to a given output stream.
Definition: Pragma.h:52