libqasm
library for handling cQASM files
|
Public Member Functions | |
Scope (const resolver::MappingTable &mappings, const resolver::FunctionTable &functions, const resolver::InstructionTable &instruction_set) | |
Creates the global scope. More... | |
Public Attributes | |
resolver::MappingTable | mappings |
The mappings visible within this scope. More... | |
resolver::FunctionTable | functions |
The functions visible within this scope. More... | |
resolver::InstructionTable | instruction_set |
The instruction set visible within this scope. More... | |
tree::Maybe< semantic::Block > | block |
The block associated with this scope, if any. More... | |
bool | within_loop |
Whether we're within at least one for, foreach, while, or repeat-until loop. More... | |
Scope information.
Definition at line 161 of file cqasm-v1-analyzer.cpp.
|
inline |
Creates the global scope.
Definition at line 197 of file cqasm-v1-analyzer.cpp.
resolver::MappingTable cqasm::v1::analyzer::Scope::mappings |
The mappings visible within this scope.
Definition at line 167 of file cqasm-v1-analyzer.cpp.
resolver::FunctionTable cqasm::v1::analyzer::Scope::functions |
The functions visible within this scope.
Definition at line 172 of file cqasm-v1-analyzer.cpp.
resolver::InstructionTable cqasm::v1::analyzer::Scope::instruction_set |
The instruction set visible within this scope.
Definition at line 177 of file cqasm-v1-analyzer.cpp.
tree::Maybe<semantic::Block> cqasm::v1::analyzer::Scope::block |
The block associated with this scope, if any.
If this is empty, this is the global scope, and the active block is that of the current subcircuit, which is lazily created when needed in case no subcircuit label is explicitly specified, and can thus not easily be populated here.
Definition at line 185 of file cqasm-v1-analyzer.cpp.
bool cqasm::v1::analyzer::Scope::within_loop |
Whether we're within at least one for, foreach, while, or repeat-until loop.
This is a necessary condition for break and continue statements to be allowed.
Definition at line 192 of file cqasm-v1-analyzer.cpp.