40 std::unordered_map<std::string, std::pair<const values::Value, tree::Maybe<ast::Mapping>>> table;
47 const std::string &name,
61 const std::unordered_map<std::string, std::pair<const values::Value, tree::Maybe<ast::Mapping>>> &
get_table()
const;
74 using FunctionImpl = std::function<values::Value(const values::Values&)>;
81 std::unique_ptr<OverloadedNameResolver<FunctionImpl>> resolver;
123 std::unique_ptr<OverloadedNameResolver<error_model::ErrorModel>> resolver;
148 const std::string &name,
159 std::unique_ptr<OverloadedNameResolver<instruction::Instruction>> resolver;
184 const std::string &name,
void add(const std::string &name, const values::Value &value, const tree::Maybe< ast::Mapping > &node=tree::Maybe< ast::Mapping >())
Adds a mapping.
const std::unordered_map< std::string, std::pair< const values::Value, tree::Maybe< ast::Mapping > > > & get_table() const
Grants read access to the underlying map.
::tree::base::Maybe< T > Maybe
This file contains the Instruction class and support types, each instance representing an instruction...
This file contains the ErrorModel class and support types, each instance representing an error model ...
Toplevel namespace with entry points for the new API.
Table of the supported instructions and their overloads.
tree::Any< Node > Values
Zero or more cQASM values.
Defines the types for the cQASM semantic tree, based on the classes from cqasm::tree.
Representation of an error model.
Representation of an available instruction (also known as gate) in the instruction set...
Table of all overloads of all constant propagation functions.
Table of the supported instructions and their overloads.
Namespace for the "new" cQASM 1.x API.
Contains custom exception objects used by libqasm.
tree::One< Node > Value
A cQASM value, either known at compile-time or an expression for something only known at runtime...
Table of all mappings within a certain scope.
CQASM_ANALYSIS_ERROR(NameResolutionFailure)
Exception for failed name resolutions.
tree::Any< TypeBase > Types
Zero or more cQASM types.
Table of overloaded callables with case-insensitive identifier matching.
values::Value resolve(const std::string &name) const
Resolves a mapping.
::tree::base::One< T > One
std::function< values::Value(const values::Values &)> FunctionImpl
C++ function representing (one of the overloads of) a function usable in cQASM constant expressions...