![]() |
rego-cpp 1.0.0
A C++ implementation of the Rego language and runtime
|
Represents a single IR statement. More...
#include <rego.hh>

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 StatementExt > | ext |
| 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) | |
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.
|
friend |
Writes the statement to a stream (used for debugging purposes)
| stream | The stream to write to |
| stmt | The statement to write |