rego-cpp 1.0.0
A C++ implementation of the Rego language and runtime
Loading...
Searching...
No Matches
rego::bundle::Statement Struct Reference

Represents a single IR statement. More...

#include <rego.hh>

Collaboration diagram for rego::bundle::Statement:

Public Member Functions

 Statement ()
 Default constructor.
 

Public Attributes

StatementType type
 The type of statement.
 
Location location
 The location of the statement in the source document.
 
Operand op0
 The first operand of the statement.
 
Operand op1
 The second operand of the statement.
 
std::int32_t target
 The target of the statement.
 
std::shared_ptr< const StatementExtext
 The (optional) extended information for the statement.
 

Friends

std::ostream & operator<< (std::ostream &stream, const Statement &stmt)
 Writes the statement to a stream (used for debugging purposes)
 

Detailed Description

Represents a single IR statement.

See https://www.openpolicyagent.org/docs/ir for more information on all statement types. Most statements can be represented using this simple struct, however there are a few statements (Block, Call, CallDynamic, Scan, and With) which require additional information. For these statements, the ext member will contain a pointer to a struct containing the additional information.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const Statement & stmt )
friend

Writes the statement to a stream (used for debugging purposes)

Parameters
streamThe stream to write to
stmtThe statement to write
Returns
The stream

The documentation for this struct was generated from the following file: