libqasm
library for handling cQASM files
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
cqasm::v1::ast::Node Class Referenceabstract

Main class for all nodes. More...

Public Member Functions

virtual NodeType type () const =0
 Returns the NodeType of this node. More...
 
virtual One< Nodecopy () const =0
 Returns a shallow copy of this node. More...
 
virtual One< Nodeclone () const =0
 Returns a deep copy of this node. More...
 
virtual bool equals (const Node &rhs) const =0
 Value-based equality operator. More...
 
virtual bool operator== (const Node &rhs) const =0
 Pointer-based equality operator. More...
 
bool operator!= (const Node &rhs) const
 Pointer-based inequality operator. More...
 
template<typename T >
visit (Visitor< T > &visitor)
 Visit this object. More...
 
void dump (std::ostream &out=std::cout, int indent=0)
 Writes a debug dump of this node to the given stream. More...
 
void dump_seq (std::ostream &out=std::cout, int indent=0)
 Alternate debug dump that represents links and node uniqueness via sequence number tags. More...
 
virtual Addas_add ()
 Interprets this node to a node of type Add. More...
 
virtual const Addas_add () const
 Interprets this node to a node of type Add. More...
 
virtual Annotatedas_annotated ()
 Interprets this node to a node of type Annotated. More...
 
virtual const Annotatedas_annotated () const
 Interprets this node to a node of type Annotated. More...
 
virtual AnnotationDataas_annotation_data ()
 Interprets this node to a node of type AnnotationData. More...
 
virtual const AnnotationDataas_annotation_data () const
 Interprets this node to a node of type AnnotationData. More...
 
virtual ArithOpas_arith_op ()
 Interprets this node to a node of type ArithOp. More...
 
virtual const ArithOpas_arith_op () const
 Interprets this node to a node of type ArithOp. More...
 
virtual Assignmentas_assignment ()
 Interprets this node to a node of type Assignment. More...
 
virtual const Assignmentas_assignment () const
 Interprets this node to a node of type Assignment. More...
 
virtual BinaryOpas_binary_op ()
 Interprets this node to a node of type BinaryOp. More...
 
virtual const BinaryOpas_binary_op () const
 Interprets this node to a node of type BinaryOp. More...
 
virtual BitwiseAndas_bitwise_and ()
 Interprets this node to a node of type BitwiseAnd. More...
 
virtual const BitwiseAndas_bitwise_and () const
 Interprets this node to a node of type BitwiseAnd. More...
 
virtual BitwiseNotas_bitwise_not ()
 Interprets this node to a node of type BitwiseNot. More...
 
virtual const BitwiseNotas_bitwise_not () const
 Interprets this node to a node of type BitwiseNot. More...
 
virtual BitwiseOpas_bitwise_op ()
 Interprets this node to a node of type BitwiseOp. More...
 
virtual const BitwiseOpas_bitwise_op () const
 Interprets this node to a node of type BitwiseOp. More...
 
virtual BitwiseOras_bitwise_or ()
 Interprets this node to a node of type BitwiseOr. More...
 
virtual const BitwiseOras_bitwise_or () const
 Interprets this node to a node of type BitwiseOr. More...
 
virtual BitwiseXoras_bitwise_xor ()
 Interprets this node to a node of type BitwiseXor. More...
 
virtual const BitwiseXoras_bitwise_xor () const
 Interprets this node to a node of type BitwiseXor. More...
 
virtual BreakStatementas_break_statement ()
 Interprets this node to a node of type BreakStatement. More...
 
virtual const BreakStatementas_break_statement () const
 Interprets this node to a node of type BreakStatement. More...
 
virtual Bundleas_bundle ()
 Interprets this node to a node of type Bundle. More...
 
virtual const Bundleas_bundle () const
 Interprets this node to a node of type Bundle. More...
 
virtual CmpEqas_cmp_eq ()
 Interprets this node to a node of type CmpEq. More...
 
virtual const CmpEqas_cmp_eq () const
 Interprets this node to a node of type CmpEq. More...
 
virtual CmpGeas_cmp_ge ()
 Interprets this node to a node of type CmpGe. More...
 
virtual const CmpGeas_cmp_ge () const
 Interprets this node to a node of type CmpGe. More...
 
virtual CmpGtas_cmp_gt ()
 Interprets this node to a node of type CmpGt. More...
 
virtual const CmpGtas_cmp_gt () const
 Interprets this node to a node of type CmpGt. More...
 
virtual CmpLeas_cmp_le ()
 Interprets this node to a node of type CmpLe. More...
 
virtual const CmpLeas_cmp_le () const
 Interprets this node to a node of type CmpLe. More...
 
virtual CmpLtas_cmp_lt ()
 Interprets this node to a node of type CmpLt. More...
 
virtual const CmpLtas_cmp_lt () const
 Interprets this node to a node of type CmpLt. More...
 
virtual CmpNeas_cmp_ne ()
 Interprets this node to a node of type CmpNe. More...
 
virtual const CmpNeas_cmp_ne () const
 Interprets this node to a node of type CmpNe. More...
 
virtual CmpOpas_cmp_op ()
 Interprets this node to a node of type CmpOp. More...
 
virtual const CmpOpas_cmp_op () const
 Interprets this node to a node of type CmpOp. More...
 
virtual ContinueStatementas_continue_statement ()
 Interprets this node to a node of type ContinueStatement. More...
 
virtual const ContinueStatementas_continue_statement () const
 Interprets this node to a node of type ContinueStatement. More...
 
virtual Divideas_divide ()
 Interprets this node to a node of type Divide. More...
 
virtual const Divideas_divide () const
 Interprets this node to a node of type Divide. More...
 
virtual ErroneousExpressionas_erroneous_expression ()
 Interprets this node to a node of type ErroneousExpression. More...
 
virtual const ErroneousExpressionas_erroneous_expression () const
 Interprets this node to a node of type ErroneousExpression. More...
 
virtual ErroneousProgramas_erroneous_program ()
 Interprets this node to a node of type ErroneousProgram. More...
 
virtual const ErroneousProgramas_erroneous_program () const
 Interprets this node to a node of type ErroneousProgram. More...
 
virtual ErroneousStatementas_erroneous_statement ()
 Interprets this node to a node of type ErroneousStatement. More...
 
virtual const ErroneousStatementas_erroneous_statement () const
 Interprets this node to a node of type ErroneousStatement. More...
 
virtual Expressionas_expression ()
 Interprets this node to a node of type Expression. More...
 
virtual const Expressionas_expression () const
 Interprets this node to a node of type Expression. More...
 
virtual ExpressionListas_expression_list ()
 Interprets this node to a node of type ExpressionList. More...
 
virtual const ExpressionListas_expression_list () const
 Interprets this node to a node of type ExpressionList. More...
 
virtual FloatLiteralas_float_literal ()
 Interprets this node to a node of type FloatLiteral. More...
 
virtual const FloatLiteralas_float_literal () const
 Interprets this node to a node of type FloatLiteral. More...
 
virtual ForLoopas_for_loop ()
 Interprets this node to a node of type ForLoop. More...
 
virtual const ForLoopas_for_loop () const
 Interprets this node to a node of type ForLoop. More...
 
virtual ForeachLoopas_foreach_loop ()
 Interprets this node to a node of type ForeachLoop. More...
 
virtual const ForeachLoopas_foreach_loop () const
 Interprets this node to a node of type ForeachLoop. More...
 
virtual FunctionCallas_function_call ()
 Interprets this node to a node of type FunctionCall. More...
 
virtual const FunctionCallas_function_call () const
 Interprets this node to a node of type FunctionCall. More...
 
virtual Identifieras_identifier ()
 Interprets this node to a node of type Identifier. More...
 
virtual const Identifieras_identifier () const
 Interprets this node to a node of type Identifier. More...
 
virtual IfElseas_if_else ()
 Interprets this node to a node of type IfElse. More...
 
virtual const IfElseas_if_else () const
 Interprets this node to a node of type IfElse. More...
 
virtual IfElseBranchas_if_else_branch ()
 Interprets this node to a node of type IfElseBranch. More...
 
virtual const IfElseBranchas_if_else_branch () const
 Interprets this node to a node of type IfElseBranch. More...
 
virtual Indexas_index ()
 Interprets this node to a node of type Index. More...
 
virtual const Indexas_index () const
 Interprets this node to a node of type Index. More...
 
virtual IndexEntryas_index_entry ()
 Interprets this node to a node of type IndexEntry. More...
 
virtual const IndexEntryas_index_entry () const
 Interprets this node to a node of type IndexEntry. More...
 
virtual IndexItemas_index_item ()
 Interprets this node to a node of type IndexItem. More...
 
virtual const IndexItemas_index_item () const
 Interprets this node to a node of type IndexItem. More...
 
virtual IndexListas_index_list ()
 Interprets this node to a node of type IndexList. More...
 
virtual const IndexListas_index_list () const
 Interprets this node to a node of type IndexList. More...
 
virtual IndexRangeas_index_range ()
 Interprets this node to a node of type IndexRange. More...
 
virtual const IndexRangeas_index_range () const
 Interprets this node to a node of type IndexRange. More...
 
virtual Instructionas_instruction ()
 Interprets this node to a node of type Instruction. More...
 
virtual const Instructionas_instruction () const
 Interprets this node to a node of type Instruction. More...
 
virtual IntDivideas_int_divide ()
 Interprets this node to a node of type IntDivide. More...
 
virtual const IntDivideas_int_divide () const
 Interprets this node to a node of type IntDivide. More...
 
virtual IntegerLiteralas_integer_literal ()
 Interprets this node to a node of type IntegerLiteral. More...
 
virtual const IntegerLiteralas_integer_literal () const
 Interprets this node to a node of type IntegerLiteral. More...
 
virtual JsonLiteralas_json_literal ()
 Interprets this node to a node of type JsonLiteral. More...
 
virtual const JsonLiteralas_json_literal () const
 Interprets this node to a node of type JsonLiteral. More...
 
virtual LogicalAndas_logical_and ()
 Interprets this node to a node of type LogicalAnd. More...
 
virtual const LogicalAndas_logical_and () const
 Interprets this node to a node of type LogicalAnd. More...
 
virtual LogicalNotas_logical_not ()
 Interprets this node to a node of type LogicalNot. More...
 
virtual const LogicalNotas_logical_not () const
 Interprets this node to a node of type LogicalNot. More...
 
virtual LogicalOpas_logical_op ()
 Interprets this node to a node of type LogicalOp. More...
 
virtual const LogicalOpas_logical_op () const
 Interprets this node to a node of type LogicalOp. More...
 
virtual LogicalOras_logical_or ()
 Interprets this node to a node of type LogicalOr. More...
 
virtual const LogicalOras_logical_or () const
 Interprets this node to a node of type LogicalOr. More...
 
virtual LogicalXoras_logical_xor ()
 Interprets this node to a node of type LogicalXor. More...
 
virtual const LogicalXoras_logical_xor () const
 Interprets this node to a node of type LogicalXor. More...
 
virtual Mappingas_mapping ()
 Interprets this node to a node of type Mapping. More...
 
virtual const Mappingas_mapping () const
 Interprets this node to a node of type Mapping. More...
 
virtual MatrixLiteralas_matrix_literal ()
 Interprets this node to a node of type MatrixLiteral. More...
 
virtual const MatrixLiteralas_matrix_literal () const
 Interprets this node to a node of type MatrixLiteral. More...
 
virtual Moduloas_modulo ()
 Interprets this node to a node of type Modulo. More...
 
virtual const Moduloas_modulo () const
 Interprets this node to a node of type Modulo. More...
 
virtual Multiplyas_multiply ()
 Interprets this node to a node of type Multiply. More...
 
virtual const Multiplyas_multiply () const
 Interprets this node to a node of type Multiply. More...
 
virtual Negateas_negate ()
 Interprets this node to a node of type Negate. More...
 
virtual const Negateas_negate () const
 Interprets this node to a node of type Negate. More...
 
virtual Poweras_power ()
 Interprets this node to a node of type Power. More...
 
virtual const Poweras_power () const
 Interprets this node to a node of type Power. More...
 
virtual Programas_program ()
 Interprets this node to a node of type Program. More...
 
virtual const Programas_program () const
 Interprets this node to a node of type Program. More...
 
virtual RepeatUntilLoopas_repeat_until_loop ()
 Interprets this node to a node of type RepeatUntilLoop. More...
 
virtual const RepeatUntilLoopas_repeat_until_loop () const
 Interprets this node to a node of type RepeatUntilLoop. More...
 
virtual Rootas_root ()
 Interprets this node to a node of type Root. More...
 
virtual const Rootas_root () const
 Interprets this node to a node of type Root. More...
 
virtual ShiftLeftas_shift_left ()
 Interprets this node to a node of type ShiftLeft. More...
 
virtual const ShiftLeftas_shift_left () const
 Interprets this node to a node of type ShiftLeft. More...
 
virtual ShiftOpas_shift_op ()
 Interprets this node to a node of type ShiftOp. More...
 
virtual const ShiftOpas_shift_op () const
 Interprets this node to a node of type ShiftOp. More...
 
virtual ShiftRightArithas_shift_right_arith ()
 Interprets this node to a node of type ShiftRightArith. More...
 
virtual const ShiftRightArithas_shift_right_arith () const
 Interprets this node to a node of type ShiftRightArith. More...
 
virtual ShiftRightLogicas_shift_right_logic ()
 Interprets this node to a node of type ShiftRightLogic. More...
 
virtual const ShiftRightLogicas_shift_right_logic () const
 Interprets this node to a node of type ShiftRightLogic. More...
 
virtual Statementas_statement ()
 Interprets this node to a node of type Statement. More...
 
virtual const Statementas_statement () const
 Interprets this node to a node of type Statement. More...
 
virtual StatementListas_statement_list ()
 Interprets this node to a node of type StatementList. More...
 
virtual const StatementListas_statement_list () const
 Interprets this node to a node of type StatementList. More...
 
virtual StringLiteralas_string_literal ()
 Interprets this node to a node of type StringLiteral. More...
 
virtual const StringLiteralas_string_literal () const
 Interprets this node to a node of type StringLiteral. More...
 
virtual Structuredas_structured ()
 Interprets this node to a node of type Structured. More...
 
virtual const Structuredas_structured () const
 Interprets this node to a node of type Structured. More...
 
virtual Subcircuitas_subcircuit ()
 Interprets this node to a node of type Subcircuit. More...
 
virtual const Subcircuitas_subcircuit () const
 Interprets this node to a node of type Subcircuit. More...
 
virtual Subtractas_subtract ()
 Interprets this node to a node of type Subtract. More...
 
virtual const Subtractas_subtract () const
 Interprets this node to a node of type Subtract. More...
 
virtual TernaryCondas_ternary_cond ()
 Interprets this node to a node of type TernaryCond. More...
 
virtual const TernaryCondas_ternary_cond () const
 Interprets this node to a node of type TernaryCond. More...
 
virtual UnaryOpas_unary_op ()
 Interprets this node to a node of type UnaryOp. More...
 
virtual const UnaryOpas_unary_op () const
 Interprets this node to a node of type UnaryOp. More...
 
virtual Variablesas_variables ()
 Interprets this node to a node of type Variables. More...
 
virtual const Variablesas_variables () const
 Interprets this node to a node of type Variables. More...
 
virtual Versionas_version ()
 Interprets this node to a node of type Version. More...
 
virtual const Versionas_version () const
 Interprets this node to a node of type Version. More...
 
virtual WhileLoopas_while_loop ()
 Interprets this node to a node of type WhileLoop. More...
 
virtual const WhileLoopas_while_loop () const
 Interprets this node to a node of type WhileLoop. More...
 
virtual void serialize (::tree::cbor::MapWriter &map, const ::tree::base::PointerMap &ids) const =0
 Serializes this node to the given map. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 

Static Public Member Functions

static std::shared_ptr< Nodedeserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids)
 Deserializes the given node. More...
 

Protected Member Functions

virtual void visit_internal (VisitorBase &visitor, void *retval=nullptr)=0
 Internal helper method for visiter pattern. More...
 

Detailed Description

Main class for all nodes.

Definition at line 380 of file cqasm-v1-ast-gen.hpp.

#include <cqasm-v1-ast-gen.hpp>

Inheritance diagram for cqasm::v1::ast::Node:
Inheritance graph
[legend]
Collaboration diagram for cqasm::v1::ast::Node:
Collaboration graph
[legend]

Member Function Documentation

◆ type()

virtual NodeType cqasm::v1::ast::Node::type ( ) const
pure virtual

Returns the NodeType of this node.

Implemented in cqasm::v1::ast::WhileLoop, cqasm::v1::ast::Version, cqasm::v1::ast::Variables, cqasm::v1::ast::TernaryCond, cqasm::v1::ast::Subtract, cqasm::v1::ast::Subcircuit, cqasm::v1::ast::StringLiteral, cqasm::v1::ast::StatementList, cqasm::v1::ast::ShiftRightLogic, cqasm::v1::ast::ShiftRightArith, cqasm::v1::ast::ShiftLeft, cqasm::v1::ast::RepeatUntilLoop, cqasm::v1::ast::Program, cqasm::v1::ast::Power, cqasm::v1::ast::Negate, cqasm::v1::ast::Multiply, cqasm::v1::ast::Modulo, cqasm::v1::ast::MatrixLiteral, cqasm::v1::ast::Mapping, cqasm::v1::ast::LogicalXor, cqasm::v1::ast::LogicalOr, cqasm::v1::ast::LogicalNot, cqasm::v1::ast::LogicalAnd, cqasm::v1::ast::JsonLiteral, cqasm::v1::ast::IntegerLiteral, cqasm::v1::ast::IntDivide, cqasm::v1::ast::Instruction, cqasm::v1::ast::IndexRange, cqasm::v1::ast::IndexList, cqasm::v1::ast::IndexItem, cqasm::v1::ast::Index, cqasm::v1::ast::IfElseBranch, cqasm::v1::ast::IfElse, cqasm::v1::ast::Identifier, cqasm::v1::ast::FunctionCall, cqasm::v1::ast::ForeachLoop, cqasm::v1::ast::ForLoop, cqasm::v1::ast::FloatLiteral, cqasm::v1::ast::ExpressionList, cqasm::v1::ast::ErroneousStatement, cqasm::v1::ast::ErroneousProgram, cqasm::v1::ast::ErroneousExpression, cqasm::v1::ast::Divide, cqasm::v1::ast::ContinueStatement, cqasm::v1::ast::CmpNe, cqasm::v1::ast::CmpLt, cqasm::v1::ast::CmpLe, cqasm::v1::ast::CmpGt, cqasm::v1::ast::CmpGe, cqasm::v1::ast::CmpEq, cqasm::v1::ast::Bundle, cqasm::v1::ast::BreakStatement, cqasm::v1::ast::BitwiseXor, cqasm::v1::ast::BitwiseOr, cqasm::v1::ast::BitwiseNot, cqasm::v1::ast::BitwiseAnd, cqasm::v1::ast::Assignment, cqasm::v1::ast::AnnotationData, and cqasm::v1::ast::Add.

◆ copy()

virtual One<Node> cqasm::v1::ast::Node::copy ( ) const
pure virtual

Returns a shallow copy of this node.

Implemented in cqasm::v1::ast::WhileLoop, cqasm::v1::ast::Version, cqasm::v1::ast::Variables, cqasm::v1::ast::TernaryCond, cqasm::v1::ast::Subtract, cqasm::v1::ast::Subcircuit, cqasm::v1::ast::StringLiteral, cqasm::v1::ast::StatementList, cqasm::v1::ast::ShiftRightLogic, cqasm::v1::ast::ShiftRightArith, cqasm::v1::ast::ShiftLeft, cqasm::v1::ast::RepeatUntilLoop, cqasm::v1::ast::Program, cqasm::v1::ast::Power, cqasm::v1::ast::Negate, cqasm::v1::ast::Multiply, cqasm::v1::ast::Modulo, cqasm::v1::ast::MatrixLiteral, cqasm::v1::ast::Mapping, cqasm::v1::ast::LogicalXor, cqasm::v1::ast::LogicalOr, cqasm::v1::ast::LogicalNot, cqasm::v1::ast::LogicalAnd, cqasm::v1::ast::JsonLiteral, cqasm::v1::ast::IntegerLiteral, cqasm::v1::ast::IntDivide, cqasm::v1::ast::Instruction, cqasm::v1::ast::IndexRange, cqasm::v1::ast::IndexList, cqasm::v1::ast::IndexItem, cqasm::v1::ast::Index, cqasm::v1::ast::IfElseBranch, cqasm::v1::ast::IfElse, cqasm::v1::ast::Identifier, cqasm::v1::ast::FunctionCall, cqasm::v1::ast::ForeachLoop, cqasm::v1::ast::ForLoop, cqasm::v1::ast::FloatLiteral, cqasm::v1::ast::ExpressionList, cqasm::v1::ast::ErroneousStatement, cqasm::v1::ast::ErroneousProgram, cqasm::v1::ast::ErroneousExpression, cqasm::v1::ast::Divide, cqasm::v1::ast::ContinueStatement, cqasm::v1::ast::CmpNe, cqasm::v1::ast::CmpLt, cqasm::v1::ast::CmpLe, cqasm::v1::ast::CmpGt, cqasm::v1::ast::CmpGe, cqasm::v1::ast::CmpEq, cqasm::v1::ast::Bundle, cqasm::v1::ast::BreakStatement, cqasm::v1::ast::BitwiseXor, cqasm::v1::ast::BitwiseOr, cqasm::v1::ast::BitwiseNot, cqasm::v1::ast::BitwiseAnd, cqasm::v1::ast::Assignment, cqasm::v1::ast::AnnotationData, and cqasm::v1::ast::Add.

◆ clone()

virtual One<Node> cqasm::v1::ast::Node::clone ( ) const
pure virtual

Returns a deep copy of this node.

Implemented in cqasm::v1::ast::WhileLoop, cqasm::v1::ast::Version, cqasm::v1::ast::Variables, cqasm::v1::ast::TernaryCond, cqasm::v1::ast::Subtract, cqasm::v1::ast::Subcircuit, cqasm::v1::ast::StringLiteral, cqasm::v1::ast::StatementList, cqasm::v1::ast::ShiftRightLogic, cqasm::v1::ast::ShiftRightArith, cqasm::v1::ast::ShiftLeft, cqasm::v1::ast::RepeatUntilLoop, cqasm::v1::ast::Program, cqasm::v1::ast::Power, cqasm::v1::ast::Negate, cqasm::v1::ast::Multiply, cqasm::v1::ast::Modulo, cqasm::v1::ast::MatrixLiteral, cqasm::v1::ast::Mapping, cqasm::v1::ast::LogicalXor, cqasm::v1::ast::LogicalOr, cqasm::v1::ast::LogicalNot, cqasm::v1::ast::LogicalAnd, cqasm::v1::ast::JsonLiteral, cqasm::v1::ast::IntegerLiteral, cqasm::v1::ast::IntDivide, cqasm::v1::ast::Instruction, cqasm::v1::ast::IndexRange, cqasm::v1::ast::IndexList, cqasm::v1::ast::IndexItem, cqasm::v1::ast::Index, cqasm::v1::ast::IfElseBranch, cqasm::v1::ast::IfElse, cqasm::v1::ast::Identifier, cqasm::v1::ast::FunctionCall, cqasm::v1::ast::ForeachLoop, cqasm::v1::ast::ForLoop, cqasm::v1::ast::FloatLiteral, cqasm::v1::ast::ExpressionList, cqasm::v1::ast::ErroneousStatement, cqasm::v1::ast::ErroneousProgram, cqasm::v1::ast::ErroneousExpression, cqasm::v1::ast::Divide, cqasm::v1::ast::ContinueStatement, cqasm::v1::ast::CmpNe, cqasm::v1::ast::CmpLt, cqasm::v1::ast::CmpLe, cqasm::v1::ast::CmpGt, cqasm::v1::ast::CmpGe, cqasm::v1::ast::CmpEq, cqasm::v1::ast::Bundle, cqasm::v1::ast::BreakStatement, cqasm::v1::ast::BitwiseXor, cqasm::v1::ast::BitwiseOr, cqasm::v1::ast::BitwiseNot, cqasm::v1::ast::BitwiseAnd, cqasm::v1::ast::Assignment, cqasm::v1::ast::AnnotationData, and cqasm::v1::ast::Add.

◆ equals()

virtual bool cqasm::v1::ast::Node::equals ( const Node rhs) const
pure virtual

Value-based equality operator.

Ignores annotations!

Implemented in cqasm::v1::ast::WhileLoop, cqasm::v1::ast::Version, cqasm::v1::ast::Variables, cqasm::v1::ast::TernaryCond, cqasm::v1::ast::Subtract, cqasm::v1::ast::Subcircuit, cqasm::v1::ast::StringLiteral, cqasm::v1::ast::StatementList, cqasm::v1::ast::ShiftRightLogic, cqasm::v1::ast::ShiftRightArith, cqasm::v1::ast::ShiftLeft, cqasm::v1::ast::RepeatUntilLoop, cqasm::v1::ast::Program, cqasm::v1::ast::Power, cqasm::v1::ast::Negate, cqasm::v1::ast::Multiply, cqasm::v1::ast::Modulo, cqasm::v1::ast::MatrixLiteral, cqasm::v1::ast::Mapping, cqasm::v1::ast::LogicalXor, cqasm::v1::ast::LogicalOr, cqasm::v1::ast::LogicalNot, cqasm::v1::ast::LogicalAnd, cqasm::v1::ast::JsonLiteral, cqasm::v1::ast::IntegerLiteral, cqasm::v1::ast::IntDivide, cqasm::v1::ast::Instruction, cqasm::v1::ast::IndexRange, cqasm::v1::ast::IndexList, cqasm::v1::ast::IndexItem, cqasm::v1::ast::Index, cqasm::v1::ast::IfElseBranch, cqasm::v1::ast::IfElse, cqasm::v1::ast::Identifier, cqasm::v1::ast::FunctionCall, cqasm::v1::ast::ForeachLoop, cqasm::v1::ast::ForLoop, cqasm::v1::ast::FloatLiteral, cqasm::v1::ast::ExpressionList, cqasm::v1::ast::ErroneousStatement, cqasm::v1::ast::ErroneousProgram, cqasm::v1::ast::ErroneousExpression, cqasm::v1::ast::Divide, cqasm::v1::ast::ContinueStatement, cqasm::v1::ast::CmpNe, cqasm::v1::ast::CmpLt, cqasm::v1::ast::CmpLe, cqasm::v1::ast::CmpGt, cqasm::v1::ast::CmpGe, cqasm::v1::ast::CmpEq, cqasm::v1::ast::Bundle, cqasm::v1::ast::BreakStatement, cqasm::v1::ast::BitwiseXor, cqasm::v1::ast::BitwiseOr, cqasm::v1::ast::BitwiseNot, cqasm::v1::ast::BitwiseAnd, cqasm::v1::ast::Assignment, cqasm::v1::ast::AnnotationData, and cqasm::v1::ast::Add.

◆ operator==()

virtual bool cqasm::v1::ast::Node::operator== ( const Node rhs) const
pure virtual

Pointer-based equality operator.

Implemented in cqasm::v1::ast::WhileLoop, cqasm::v1::ast::Version, cqasm::v1::ast::Variables, cqasm::v1::ast::TernaryCond, cqasm::v1::ast::Subtract, cqasm::v1::ast::Subcircuit, cqasm::v1::ast::StringLiteral, cqasm::v1::ast::StatementList, cqasm::v1::ast::ShiftRightLogic, cqasm::v1::ast::ShiftRightArith, cqasm::v1::ast::ShiftLeft, cqasm::v1::ast::RepeatUntilLoop, cqasm::v1::ast::Program, cqasm::v1::ast::Power, cqasm::v1::ast::Negate, cqasm::v1::ast::Multiply, cqasm::v1::ast::Modulo, cqasm::v1::ast::MatrixLiteral, cqasm::v1::ast::Mapping, cqasm::v1::ast::LogicalXor, cqasm::v1::ast::LogicalOr, cqasm::v1::ast::LogicalNot, cqasm::v1::ast::LogicalAnd, cqasm::v1::ast::JsonLiteral, cqasm::v1::ast::IntegerLiteral, cqasm::v1::ast::IntDivide, cqasm::v1::ast::Instruction, cqasm::v1::ast::IndexRange, cqasm::v1::ast::IndexList, cqasm::v1::ast::IndexItem, cqasm::v1::ast::Index, cqasm::v1::ast::IfElseBranch, cqasm::v1::ast::IfElse, cqasm::v1::ast::Identifier, cqasm::v1::ast::FunctionCall, cqasm::v1::ast::ForeachLoop, cqasm::v1::ast::ForLoop, cqasm::v1::ast::FloatLiteral, cqasm::v1::ast::ExpressionList, cqasm::v1::ast::ErroneousStatement, cqasm::v1::ast::ErroneousProgram, cqasm::v1::ast::ErroneousExpression, cqasm::v1::ast::Divide, cqasm::v1::ast::ContinueStatement, cqasm::v1::ast::CmpNe, cqasm::v1::ast::CmpLt, cqasm::v1::ast::CmpLe, cqasm::v1::ast::CmpGt, cqasm::v1::ast::CmpGe, cqasm::v1::ast::CmpEq, cqasm::v1::ast::Bundle, cqasm::v1::ast::BreakStatement, cqasm::v1::ast::BitwiseXor, cqasm::v1::ast::BitwiseOr, cqasm::v1::ast::BitwiseNot, cqasm::v1::ast::BitwiseAnd, cqasm::v1::ast::Assignment, cqasm::v1::ast::AnnotationData, and cqasm::v1::ast::Add.

◆ operator!=()

bool cqasm::v1::ast::Node::operator!= ( const Node rhs) const
inline

Pointer-based inequality operator.

Definition at line 411 of file cqasm-v1-ast-gen.hpp.

◆ visit_internal()

virtual void cqasm::v1::ast::Node::visit_internal ( VisitorBase visitor,
void *  retval = nullptr 
)
protectedpure virtual

Internal helper method for visiter pattern.

Implemented in cqasm::v1::ast::WhileLoop, cqasm::v1::ast::Version, cqasm::v1::ast::Variables, cqasm::v1::ast::TernaryCond, cqasm::v1::ast::Subtract, cqasm::v1::ast::Subcircuit, cqasm::v1::ast::StringLiteral, cqasm::v1::ast::StatementList, cqasm::v1::ast::ShiftRightLogic, cqasm::v1::ast::ShiftRightArith, cqasm::v1::ast::ShiftLeft, cqasm::v1::ast::RepeatUntilLoop, cqasm::v1::ast::Program, cqasm::v1::ast::Power, cqasm::v1::ast::Negate, cqasm::v1::ast::Multiply, cqasm::v1::ast::Modulo, cqasm::v1::ast::MatrixLiteral, cqasm::v1::ast::Mapping, cqasm::v1::ast::LogicalXor, cqasm::v1::ast::LogicalOr, cqasm::v1::ast::LogicalNot, cqasm::v1::ast::LogicalAnd, cqasm::v1::ast::JsonLiteral, cqasm::v1::ast::IntegerLiteral, cqasm::v1::ast::IntDivide, cqasm::v1::ast::Instruction, cqasm::v1::ast::IndexRange, cqasm::v1::ast::IndexList, cqasm::v1::ast::IndexItem, cqasm::v1::ast::Index, cqasm::v1::ast::IfElseBranch, cqasm::v1::ast::IfElse, cqasm::v1::ast::Identifier, cqasm::v1::ast::FunctionCall, cqasm::v1::ast::ForeachLoop, cqasm::v1::ast::ForLoop, cqasm::v1::ast::FloatLiteral, cqasm::v1::ast::ExpressionList, cqasm::v1::ast::ErroneousStatement, cqasm::v1::ast::ErroneousProgram, cqasm::v1::ast::ErroneousExpression, cqasm::v1::ast::Divide, cqasm::v1::ast::ContinueStatement, cqasm::v1::ast::CmpNe, cqasm::v1::ast::CmpLt, cqasm::v1::ast::CmpLe, cqasm::v1::ast::CmpGt, cqasm::v1::ast::CmpGe, cqasm::v1::ast::CmpEq, cqasm::v1::ast::Bundle, cqasm::v1::ast::BreakStatement, cqasm::v1::ast::BitwiseXor, cqasm::v1::ast::BitwiseOr, cqasm::v1::ast::BitwiseNot, cqasm::v1::ast::BitwiseAnd, cqasm::v1::ast::Assignment, cqasm::v1::ast::AnnotationData, and cqasm::v1::ast::Add.

◆ visit() [1/8]

template<typename T >
T cqasm::v1::ast::Node::visit ( Visitor< T > &  visitor)

Visit this object.

Definition at line 10268 of file cqasm-v1-ast-gen.hpp.

◆ dump()

void cqasm::v1::ast::Node::dump ( std::ostream &  out = std::cout,
int  indent = 0 
)

Writes a debug dump of this node to the given stream.

Definition at line 15 of file cqasm-v1-ast-gen.cpp.

◆ dump_seq()

void cqasm::v1::ast::Node::dump_seq ( std::ostream &  out = std::cout,
int  indent = 0 
)

Alternate debug dump that represents links and node uniqueness via sequence number tags.

Definition at line 24 of file cqasm-v1-ast-gen.cpp.

◆ as_add() [1/2]

Add * cqasm::v1::ast::Node::as_add ( )
virtual

Interprets this node to a node of type Add.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Add.

Definition at line 37 of file cqasm-v1-ast-gen.cpp.

◆ as_add() [2/2]

const Add * cqasm::v1::ast::Node::as_add ( ) const
virtual

Interprets this node to a node of type Add.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Add.

Definition at line 45 of file cqasm-v1-ast-gen.cpp.

◆ as_annotated() [1/2]

Annotated * cqasm::v1::ast::Node::as_annotated ( )
virtual

Interprets this node to a node of type Annotated.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Annotated.

Definition at line 53 of file cqasm-v1-ast-gen.cpp.

◆ as_annotated() [2/2]

const Annotated * cqasm::v1::ast::Node::as_annotated ( ) const
virtual

Interprets this node to a node of type Annotated.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Annotated.

Definition at line 61 of file cqasm-v1-ast-gen.cpp.

◆ as_annotation_data() [1/2]

AnnotationData * cqasm::v1::ast::Node::as_annotation_data ( )
virtual

Interprets this node to a node of type AnnotationData.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::AnnotationData.

Definition at line 69 of file cqasm-v1-ast-gen.cpp.

◆ as_annotation_data() [2/2]

const AnnotationData * cqasm::v1::ast::Node::as_annotation_data ( ) const
virtual

Interprets this node to a node of type AnnotationData.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::AnnotationData.

Definition at line 77 of file cqasm-v1-ast-gen.cpp.

◆ as_arith_op() [1/2]

ArithOp * cqasm::v1::ast::Node::as_arith_op ( )
virtual

Interprets this node to a node of type ArithOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ArithOp.

Definition at line 85 of file cqasm-v1-ast-gen.cpp.

◆ as_arith_op() [2/2]

const ArithOp * cqasm::v1::ast::Node::as_arith_op ( ) const
virtual

Interprets this node to a node of type ArithOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ArithOp.

Definition at line 93 of file cqasm-v1-ast-gen.cpp.

◆ as_assignment() [1/2]

Assignment * cqasm::v1::ast::Node::as_assignment ( )
virtual

Interprets this node to a node of type Assignment.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Assignment.

Definition at line 101 of file cqasm-v1-ast-gen.cpp.

◆ as_assignment() [2/2]

const Assignment * cqasm::v1::ast::Node::as_assignment ( ) const
virtual

Interprets this node to a node of type Assignment.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Assignment.

Definition at line 109 of file cqasm-v1-ast-gen.cpp.

◆ as_binary_op() [1/2]

BinaryOp * cqasm::v1::ast::Node::as_binary_op ( )
virtual

Interprets this node to a node of type BinaryOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BinaryOp.

Definition at line 117 of file cqasm-v1-ast-gen.cpp.

◆ as_binary_op() [2/2]

const BinaryOp * cqasm::v1::ast::Node::as_binary_op ( ) const
virtual

Interprets this node to a node of type BinaryOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BinaryOp.

Definition at line 125 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_and() [1/2]

BitwiseAnd * cqasm::v1::ast::Node::as_bitwise_and ( )
virtual

Interprets this node to a node of type BitwiseAnd.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseAnd.

Definition at line 133 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_and() [2/2]

const BitwiseAnd * cqasm::v1::ast::Node::as_bitwise_and ( ) const
virtual

Interprets this node to a node of type BitwiseAnd.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseAnd.

Definition at line 141 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_not() [1/2]

BitwiseNot * cqasm::v1::ast::Node::as_bitwise_not ( )
virtual

Interprets this node to a node of type BitwiseNot.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseNot.

Definition at line 149 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_not() [2/2]

const BitwiseNot * cqasm::v1::ast::Node::as_bitwise_not ( ) const
virtual

Interprets this node to a node of type BitwiseNot.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseNot.

Definition at line 157 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_op() [1/2]

BitwiseOp * cqasm::v1::ast::Node::as_bitwise_op ( )
virtual

Interprets this node to a node of type BitwiseOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseOp.

Definition at line 165 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_op() [2/2]

const BitwiseOp * cqasm::v1::ast::Node::as_bitwise_op ( ) const
virtual

Interprets this node to a node of type BitwiseOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseOp.

Definition at line 173 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_or() [1/2]

BitwiseOr * cqasm::v1::ast::Node::as_bitwise_or ( )
virtual

Interprets this node to a node of type BitwiseOr.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseOr.

Definition at line 181 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_or() [2/2]

const BitwiseOr * cqasm::v1::ast::Node::as_bitwise_or ( ) const
virtual

Interprets this node to a node of type BitwiseOr.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseOr.

Definition at line 189 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_xor() [1/2]

BitwiseXor * cqasm::v1::ast::Node::as_bitwise_xor ( )
virtual

Interprets this node to a node of type BitwiseXor.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseXor.

Definition at line 197 of file cqasm-v1-ast-gen.cpp.

◆ as_bitwise_xor() [2/2]

const BitwiseXor * cqasm::v1::ast::Node::as_bitwise_xor ( ) const
virtual

Interprets this node to a node of type BitwiseXor.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BitwiseXor.

Definition at line 205 of file cqasm-v1-ast-gen.cpp.

◆ as_break_statement() [1/2]

BreakStatement * cqasm::v1::ast::Node::as_break_statement ( )
virtual

Interprets this node to a node of type BreakStatement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BreakStatement.

Definition at line 213 of file cqasm-v1-ast-gen.cpp.

◆ as_break_statement() [2/2]

const BreakStatement * cqasm::v1::ast::Node::as_break_statement ( ) const
virtual

Interprets this node to a node of type BreakStatement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::BreakStatement.

Definition at line 221 of file cqasm-v1-ast-gen.cpp.

◆ as_bundle() [1/2]

Bundle * cqasm::v1::ast::Node::as_bundle ( )
virtual

Interprets this node to a node of type Bundle.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Bundle.

Definition at line 229 of file cqasm-v1-ast-gen.cpp.

◆ as_bundle() [2/2]

const Bundle * cqasm::v1::ast::Node::as_bundle ( ) const
virtual

Interprets this node to a node of type Bundle.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Bundle.

Definition at line 237 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_eq() [1/2]

CmpEq * cqasm::v1::ast::Node::as_cmp_eq ( )
virtual

Interprets this node to a node of type CmpEq.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpEq.

Definition at line 245 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_eq() [2/2]

const CmpEq * cqasm::v1::ast::Node::as_cmp_eq ( ) const
virtual

Interprets this node to a node of type CmpEq.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpEq.

Definition at line 253 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_ge() [1/2]

CmpGe * cqasm::v1::ast::Node::as_cmp_ge ( )
virtual

Interprets this node to a node of type CmpGe.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpGe.

Definition at line 261 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_ge() [2/2]

const CmpGe * cqasm::v1::ast::Node::as_cmp_ge ( ) const
virtual

Interprets this node to a node of type CmpGe.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpGe.

Definition at line 269 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_gt() [1/2]

CmpGt * cqasm::v1::ast::Node::as_cmp_gt ( )
virtual

Interprets this node to a node of type CmpGt.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpGt.

Definition at line 277 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_gt() [2/2]

const CmpGt * cqasm::v1::ast::Node::as_cmp_gt ( ) const
virtual

Interprets this node to a node of type CmpGt.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpGt.

Definition at line 285 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_le() [1/2]

CmpLe * cqasm::v1::ast::Node::as_cmp_le ( )
virtual

Interprets this node to a node of type CmpLe.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpLe.

Definition at line 293 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_le() [2/2]

const CmpLe * cqasm::v1::ast::Node::as_cmp_le ( ) const
virtual

Interprets this node to a node of type CmpLe.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpLe.

Definition at line 301 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_lt() [1/2]

CmpLt * cqasm::v1::ast::Node::as_cmp_lt ( )
virtual

Interprets this node to a node of type CmpLt.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpLt.

Definition at line 309 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_lt() [2/2]

const CmpLt * cqasm::v1::ast::Node::as_cmp_lt ( ) const
virtual

Interprets this node to a node of type CmpLt.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpLt.

Definition at line 317 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_ne() [1/2]

CmpNe * cqasm::v1::ast::Node::as_cmp_ne ( )
virtual

Interprets this node to a node of type CmpNe.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpNe.

Definition at line 325 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_ne() [2/2]

const CmpNe * cqasm::v1::ast::Node::as_cmp_ne ( ) const
virtual

Interprets this node to a node of type CmpNe.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpNe.

Definition at line 333 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_op() [1/2]

CmpOp * cqasm::v1::ast::Node::as_cmp_op ( )
virtual

Interprets this node to a node of type CmpOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpOp.

Definition at line 341 of file cqasm-v1-ast-gen.cpp.

◆ as_cmp_op() [2/2]

const CmpOp * cqasm::v1::ast::Node::as_cmp_op ( ) const
virtual

Interprets this node to a node of type CmpOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::CmpOp.

Definition at line 349 of file cqasm-v1-ast-gen.cpp.

◆ as_continue_statement() [1/2]

ContinueStatement * cqasm::v1::ast::Node::as_continue_statement ( )
virtual

Interprets this node to a node of type ContinueStatement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ContinueStatement.

Definition at line 357 of file cqasm-v1-ast-gen.cpp.

◆ as_continue_statement() [2/2]

const ContinueStatement * cqasm::v1::ast::Node::as_continue_statement ( ) const
virtual

Interprets this node to a node of type ContinueStatement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ContinueStatement.

Definition at line 365 of file cqasm-v1-ast-gen.cpp.

◆ as_divide() [1/2]

Divide * cqasm::v1::ast::Node::as_divide ( )
virtual

Interprets this node to a node of type Divide.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Divide.

Definition at line 373 of file cqasm-v1-ast-gen.cpp.

◆ as_divide() [2/2]

const Divide * cqasm::v1::ast::Node::as_divide ( ) const
virtual

Interprets this node to a node of type Divide.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Divide.

Definition at line 381 of file cqasm-v1-ast-gen.cpp.

◆ as_erroneous_expression() [1/2]

ErroneousExpression * cqasm::v1::ast::Node::as_erroneous_expression ( )
virtual

Interprets this node to a node of type ErroneousExpression.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ErroneousExpression.

Definition at line 389 of file cqasm-v1-ast-gen.cpp.

◆ as_erroneous_expression() [2/2]

const ErroneousExpression * cqasm::v1::ast::Node::as_erroneous_expression ( ) const
virtual

Interprets this node to a node of type ErroneousExpression.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ErroneousExpression.

Definition at line 397 of file cqasm-v1-ast-gen.cpp.

◆ as_erroneous_program() [1/2]

ErroneousProgram * cqasm::v1::ast::Node::as_erroneous_program ( )
virtual

Interprets this node to a node of type ErroneousProgram.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ErroneousProgram.

Definition at line 405 of file cqasm-v1-ast-gen.cpp.

◆ as_erroneous_program() [2/2]

const ErroneousProgram * cqasm::v1::ast::Node::as_erroneous_program ( ) const
virtual

Interprets this node to a node of type ErroneousProgram.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ErroneousProgram.

Definition at line 413 of file cqasm-v1-ast-gen.cpp.

◆ as_erroneous_statement() [1/2]

ErroneousStatement * cqasm::v1::ast::Node::as_erroneous_statement ( )
virtual

Interprets this node to a node of type ErroneousStatement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ErroneousStatement.

Definition at line 421 of file cqasm-v1-ast-gen.cpp.

◆ as_erroneous_statement() [2/2]

const ErroneousStatement * cqasm::v1::ast::Node::as_erroneous_statement ( ) const
virtual

Interprets this node to a node of type ErroneousStatement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ErroneousStatement.

Definition at line 429 of file cqasm-v1-ast-gen.cpp.

◆ as_expression() [1/2]

Expression * cqasm::v1::ast::Node::as_expression ( )
virtual

Interprets this node to a node of type Expression.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Expression.

Definition at line 437 of file cqasm-v1-ast-gen.cpp.

◆ as_expression() [2/2]

const Expression * cqasm::v1::ast::Node::as_expression ( ) const
virtual

Interprets this node to a node of type Expression.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Expression.

Definition at line 445 of file cqasm-v1-ast-gen.cpp.

◆ as_expression_list() [1/2]

ExpressionList * cqasm::v1::ast::Node::as_expression_list ( )
virtual

Interprets this node to a node of type ExpressionList.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ExpressionList.

Definition at line 453 of file cqasm-v1-ast-gen.cpp.

◆ as_expression_list() [2/2]

const ExpressionList * cqasm::v1::ast::Node::as_expression_list ( ) const
virtual

Interprets this node to a node of type ExpressionList.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ExpressionList.

Definition at line 461 of file cqasm-v1-ast-gen.cpp.

◆ as_float_literal() [1/2]

FloatLiteral * cqasm::v1::ast::Node::as_float_literal ( )
virtual

Interprets this node to a node of type FloatLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::FloatLiteral.

Definition at line 469 of file cqasm-v1-ast-gen.cpp.

◆ as_float_literal() [2/2]

const FloatLiteral * cqasm::v1::ast::Node::as_float_literal ( ) const
virtual

Interprets this node to a node of type FloatLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::FloatLiteral.

Definition at line 477 of file cqasm-v1-ast-gen.cpp.

◆ as_for_loop() [1/2]

ForLoop * cqasm::v1::ast::Node::as_for_loop ( )
virtual

Interprets this node to a node of type ForLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ForLoop.

Definition at line 485 of file cqasm-v1-ast-gen.cpp.

◆ as_for_loop() [2/2]

const ForLoop * cqasm::v1::ast::Node::as_for_loop ( ) const
virtual

Interprets this node to a node of type ForLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ForLoop.

Definition at line 493 of file cqasm-v1-ast-gen.cpp.

◆ as_foreach_loop() [1/2]

ForeachLoop * cqasm::v1::ast::Node::as_foreach_loop ( )
virtual

Interprets this node to a node of type ForeachLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ForeachLoop.

Definition at line 501 of file cqasm-v1-ast-gen.cpp.

◆ as_foreach_loop() [2/2]

const ForeachLoop * cqasm::v1::ast::Node::as_foreach_loop ( ) const
virtual

Interprets this node to a node of type ForeachLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ForeachLoop.

Definition at line 509 of file cqasm-v1-ast-gen.cpp.

◆ as_function_call() [1/2]

FunctionCall * cqasm::v1::ast::Node::as_function_call ( )
virtual

Interprets this node to a node of type FunctionCall.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::FunctionCall.

Definition at line 517 of file cqasm-v1-ast-gen.cpp.

◆ as_function_call() [2/2]

const FunctionCall * cqasm::v1::ast::Node::as_function_call ( ) const
virtual

Interprets this node to a node of type FunctionCall.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::FunctionCall.

Definition at line 525 of file cqasm-v1-ast-gen.cpp.

◆ as_identifier() [1/2]

Identifier * cqasm::v1::ast::Node::as_identifier ( )
virtual

Interprets this node to a node of type Identifier.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Identifier.

Definition at line 533 of file cqasm-v1-ast-gen.cpp.

◆ as_identifier() [2/2]

const Identifier * cqasm::v1::ast::Node::as_identifier ( ) const
virtual

Interprets this node to a node of type Identifier.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Identifier.

Definition at line 541 of file cqasm-v1-ast-gen.cpp.

◆ as_if_else() [1/2]

IfElse * cqasm::v1::ast::Node::as_if_else ( )
virtual

Interprets this node to a node of type IfElse.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IfElse.

Definition at line 549 of file cqasm-v1-ast-gen.cpp.

◆ as_if_else() [2/2]

const IfElse * cqasm::v1::ast::Node::as_if_else ( ) const
virtual

Interprets this node to a node of type IfElse.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IfElse.

Definition at line 557 of file cqasm-v1-ast-gen.cpp.

◆ as_if_else_branch() [1/2]

IfElseBranch * cqasm::v1::ast::Node::as_if_else_branch ( )
virtual

Interprets this node to a node of type IfElseBranch.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IfElseBranch.

Definition at line 565 of file cqasm-v1-ast-gen.cpp.

◆ as_if_else_branch() [2/2]

const IfElseBranch * cqasm::v1::ast::Node::as_if_else_branch ( ) const
virtual

Interprets this node to a node of type IfElseBranch.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IfElseBranch.

Definition at line 573 of file cqasm-v1-ast-gen.cpp.

◆ as_index() [1/2]

Index * cqasm::v1::ast::Node::as_index ( )
virtual

Interprets this node to a node of type Index.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Index.

Definition at line 581 of file cqasm-v1-ast-gen.cpp.

◆ as_index() [2/2]

const Index * cqasm::v1::ast::Node::as_index ( ) const
virtual

Interprets this node to a node of type Index.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Index.

Definition at line 589 of file cqasm-v1-ast-gen.cpp.

◆ as_index_entry() [1/2]

IndexEntry * cqasm::v1::ast::Node::as_index_entry ( )
virtual

Interprets this node to a node of type IndexEntry.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexEntry.

Definition at line 597 of file cqasm-v1-ast-gen.cpp.

◆ as_index_entry() [2/2]

const IndexEntry * cqasm::v1::ast::Node::as_index_entry ( ) const
virtual

Interprets this node to a node of type IndexEntry.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexEntry.

Definition at line 605 of file cqasm-v1-ast-gen.cpp.

◆ as_index_item() [1/2]

IndexItem * cqasm::v1::ast::Node::as_index_item ( )
virtual

Interprets this node to a node of type IndexItem.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexItem.

Definition at line 613 of file cqasm-v1-ast-gen.cpp.

◆ as_index_item() [2/2]

const IndexItem * cqasm::v1::ast::Node::as_index_item ( ) const
virtual

Interprets this node to a node of type IndexItem.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexItem.

Definition at line 621 of file cqasm-v1-ast-gen.cpp.

◆ as_index_list() [1/2]

IndexList * cqasm::v1::ast::Node::as_index_list ( )
virtual

Interprets this node to a node of type IndexList.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexList.

Definition at line 629 of file cqasm-v1-ast-gen.cpp.

◆ as_index_list() [2/2]

const IndexList * cqasm::v1::ast::Node::as_index_list ( ) const
virtual

Interprets this node to a node of type IndexList.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexList.

Definition at line 637 of file cqasm-v1-ast-gen.cpp.

◆ as_index_range() [1/2]

IndexRange * cqasm::v1::ast::Node::as_index_range ( )
virtual

Interprets this node to a node of type IndexRange.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexRange.

Definition at line 645 of file cqasm-v1-ast-gen.cpp.

◆ as_index_range() [2/2]

const IndexRange * cqasm::v1::ast::Node::as_index_range ( ) const
virtual

Interprets this node to a node of type IndexRange.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IndexRange.

Definition at line 653 of file cqasm-v1-ast-gen.cpp.

◆ as_instruction() [1/2]

Instruction * cqasm::v1::ast::Node::as_instruction ( )
virtual

Interprets this node to a node of type Instruction.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Instruction.

Definition at line 661 of file cqasm-v1-ast-gen.cpp.

◆ as_instruction() [2/2]

const Instruction * cqasm::v1::ast::Node::as_instruction ( ) const
virtual

Interprets this node to a node of type Instruction.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Instruction.

Definition at line 669 of file cqasm-v1-ast-gen.cpp.

◆ as_int_divide() [1/2]

IntDivide * cqasm::v1::ast::Node::as_int_divide ( )
virtual

Interprets this node to a node of type IntDivide.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IntDivide.

Definition at line 677 of file cqasm-v1-ast-gen.cpp.

◆ as_int_divide() [2/2]

const IntDivide * cqasm::v1::ast::Node::as_int_divide ( ) const
virtual

Interprets this node to a node of type IntDivide.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IntDivide.

Definition at line 685 of file cqasm-v1-ast-gen.cpp.

◆ as_integer_literal() [1/2]

IntegerLiteral * cqasm::v1::ast::Node::as_integer_literal ( )
virtual

Interprets this node to a node of type IntegerLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IntegerLiteral.

Definition at line 693 of file cqasm-v1-ast-gen.cpp.

◆ as_integer_literal() [2/2]

const IntegerLiteral * cqasm::v1::ast::Node::as_integer_literal ( ) const
virtual

Interprets this node to a node of type IntegerLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::IntegerLiteral.

Definition at line 701 of file cqasm-v1-ast-gen.cpp.

◆ as_json_literal() [1/2]

JsonLiteral * cqasm::v1::ast::Node::as_json_literal ( )
virtual

Interprets this node to a node of type JsonLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::JsonLiteral.

Definition at line 709 of file cqasm-v1-ast-gen.cpp.

◆ as_json_literal() [2/2]

const JsonLiteral * cqasm::v1::ast::Node::as_json_literal ( ) const
virtual

Interprets this node to a node of type JsonLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::JsonLiteral.

Definition at line 717 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_and() [1/2]

LogicalAnd * cqasm::v1::ast::Node::as_logical_and ( )
virtual

Interprets this node to a node of type LogicalAnd.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalAnd.

Definition at line 725 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_and() [2/2]

const LogicalAnd * cqasm::v1::ast::Node::as_logical_and ( ) const
virtual

Interprets this node to a node of type LogicalAnd.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalAnd.

Definition at line 733 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_not() [1/2]

LogicalNot * cqasm::v1::ast::Node::as_logical_not ( )
virtual

Interprets this node to a node of type LogicalNot.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalNot.

Definition at line 741 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_not() [2/2]

const LogicalNot * cqasm::v1::ast::Node::as_logical_not ( ) const
virtual

Interprets this node to a node of type LogicalNot.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalNot.

Definition at line 749 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_op() [1/2]

LogicalOp * cqasm::v1::ast::Node::as_logical_op ( )
virtual

Interprets this node to a node of type LogicalOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalOp.

Definition at line 757 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_op() [2/2]

const LogicalOp * cqasm::v1::ast::Node::as_logical_op ( ) const
virtual

Interprets this node to a node of type LogicalOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalOp.

Definition at line 765 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_or() [1/2]

LogicalOr * cqasm::v1::ast::Node::as_logical_or ( )
virtual

Interprets this node to a node of type LogicalOr.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalOr.

Definition at line 773 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_or() [2/2]

const LogicalOr * cqasm::v1::ast::Node::as_logical_or ( ) const
virtual

Interprets this node to a node of type LogicalOr.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalOr.

Definition at line 781 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_xor() [1/2]

LogicalXor * cqasm::v1::ast::Node::as_logical_xor ( )
virtual

Interprets this node to a node of type LogicalXor.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalXor.

Definition at line 789 of file cqasm-v1-ast-gen.cpp.

◆ as_logical_xor() [2/2]

const LogicalXor * cqasm::v1::ast::Node::as_logical_xor ( ) const
virtual

Interprets this node to a node of type LogicalXor.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::LogicalXor.

Definition at line 797 of file cqasm-v1-ast-gen.cpp.

◆ as_mapping() [1/2]

Mapping * cqasm::v1::ast::Node::as_mapping ( )
virtual

Interprets this node to a node of type Mapping.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Mapping.

Definition at line 805 of file cqasm-v1-ast-gen.cpp.

◆ as_mapping() [2/2]

const Mapping * cqasm::v1::ast::Node::as_mapping ( ) const
virtual

Interprets this node to a node of type Mapping.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Mapping.

Definition at line 813 of file cqasm-v1-ast-gen.cpp.

◆ as_matrix_literal() [1/2]

MatrixLiteral * cqasm::v1::ast::Node::as_matrix_literal ( )
virtual

Interprets this node to a node of type MatrixLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::MatrixLiteral.

Definition at line 821 of file cqasm-v1-ast-gen.cpp.

◆ as_matrix_literal() [2/2]

const MatrixLiteral * cqasm::v1::ast::Node::as_matrix_literal ( ) const
virtual

Interprets this node to a node of type MatrixLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::MatrixLiteral.

Definition at line 829 of file cqasm-v1-ast-gen.cpp.

◆ as_modulo() [1/2]

Modulo * cqasm::v1::ast::Node::as_modulo ( )
virtual

Interprets this node to a node of type Modulo.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Modulo.

Definition at line 837 of file cqasm-v1-ast-gen.cpp.

◆ as_modulo() [2/2]

const Modulo * cqasm::v1::ast::Node::as_modulo ( ) const
virtual

Interprets this node to a node of type Modulo.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Modulo.

Definition at line 845 of file cqasm-v1-ast-gen.cpp.

◆ as_multiply() [1/2]

Multiply * cqasm::v1::ast::Node::as_multiply ( )
virtual

Interprets this node to a node of type Multiply.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Multiply.

Definition at line 853 of file cqasm-v1-ast-gen.cpp.

◆ as_multiply() [2/2]

const Multiply * cqasm::v1::ast::Node::as_multiply ( ) const
virtual

Interprets this node to a node of type Multiply.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Multiply.

Definition at line 861 of file cqasm-v1-ast-gen.cpp.

◆ as_negate() [1/2]

Negate * cqasm::v1::ast::Node::as_negate ( )
virtual

Interprets this node to a node of type Negate.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Negate.

Definition at line 869 of file cqasm-v1-ast-gen.cpp.

◆ as_negate() [2/2]

const Negate * cqasm::v1::ast::Node::as_negate ( ) const
virtual

Interprets this node to a node of type Negate.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Negate.

Definition at line 877 of file cqasm-v1-ast-gen.cpp.

◆ as_power() [1/2]

Power * cqasm::v1::ast::Node::as_power ( )
virtual

Interprets this node to a node of type Power.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Power.

Definition at line 885 of file cqasm-v1-ast-gen.cpp.

◆ as_power() [2/2]

const Power * cqasm::v1::ast::Node::as_power ( ) const
virtual

Interprets this node to a node of type Power.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Power.

Definition at line 893 of file cqasm-v1-ast-gen.cpp.

◆ as_program() [1/2]

Program * cqasm::v1::ast::Node::as_program ( )
virtual

Interprets this node to a node of type Program.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Program.

Definition at line 901 of file cqasm-v1-ast-gen.cpp.

◆ as_program() [2/2]

const Program * cqasm::v1::ast::Node::as_program ( ) const
virtual

Interprets this node to a node of type Program.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Program.

Definition at line 909 of file cqasm-v1-ast-gen.cpp.

◆ as_repeat_until_loop() [1/2]

RepeatUntilLoop * cqasm::v1::ast::Node::as_repeat_until_loop ( )
virtual

Interprets this node to a node of type RepeatUntilLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::RepeatUntilLoop.

Definition at line 917 of file cqasm-v1-ast-gen.cpp.

◆ as_repeat_until_loop() [2/2]

const RepeatUntilLoop * cqasm::v1::ast::Node::as_repeat_until_loop ( ) const
virtual

Interprets this node to a node of type RepeatUntilLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::RepeatUntilLoop.

Definition at line 925 of file cqasm-v1-ast-gen.cpp.

◆ as_root() [1/2]

Root * cqasm::v1::ast::Node::as_root ( )
virtual

Interprets this node to a node of type Root.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Root.

Definition at line 933 of file cqasm-v1-ast-gen.cpp.

◆ as_root() [2/2]

const Root * cqasm::v1::ast::Node::as_root ( ) const
virtual

Interprets this node to a node of type Root.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Root.

Definition at line 941 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_left() [1/2]

ShiftLeft * cqasm::v1::ast::Node::as_shift_left ( )
virtual

Interprets this node to a node of type ShiftLeft.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftLeft.

Definition at line 949 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_left() [2/2]

const ShiftLeft * cqasm::v1::ast::Node::as_shift_left ( ) const
virtual

Interprets this node to a node of type ShiftLeft.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftLeft.

Definition at line 957 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_op() [1/2]

ShiftOp * cqasm::v1::ast::Node::as_shift_op ( )
virtual

Interprets this node to a node of type ShiftOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftOp.

Definition at line 965 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_op() [2/2]

const ShiftOp * cqasm::v1::ast::Node::as_shift_op ( ) const
virtual

Interprets this node to a node of type ShiftOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftOp.

Definition at line 973 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_right_arith() [1/2]

ShiftRightArith * cqasm::v1::ast::Node::as_shift_right_arith ( )
virtual

Interprets this node to a node of type ShiftRightArith.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftRightArith.

Definition at line 981 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_right_arith() [2/2]

const ShiftRightArith * cqasm::v1::ast::Node::as_shift_right_arith ( ) const
virtual

Interprets this node to a node of type ShiftRightArith.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftRightArith.

Definition at line 989 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_right_logic() [1/2]

ShiftRightLogic * cqasm::v1::ast::Node::as_shift_right_logic ( )
virtual

Interprets this node to a node of type ShiftRightLogic.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftRightLogic.

Definition at line 997 of file cqasm-v1-ast-gen.cpp.

◆ as_shift_right_logic() [2/2]

const ShiftRightLogic * cqasm::v1::ast::Node::as_shift_right_logic ( ) const
virtual

Interprets this node to a node of type ShiftRightLogic.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::ShiftRightLogic.

Definition at line 1005 of file cqasm-v1-ast-gen.cpp.

◆ as_statement() [1/2]

Statement * cqasm::v1::ast::Node::as_statement ( )
virtual

Interprets this node to a node of type Statement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Statement.

Definition at line 1013 of file cqasm-v1-ast-gen.cpp.

◆ as_statement() [2/2]

const Statement * cqasm::v1::ast::Node::as_statement ( ) const
virtual

Interprets this node to a node of type Statement.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Statement.

Definition at line 1021 of file cqasm-v1-ast-gen.cpp.

◆ as_statement_list() [1/2]

StatementList * cqasm::v1::ast::Node::as_statement_list ( )
virtual

Interprets this node to a node of type StatementList.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::StatementList.

Definition at line 1029 of file cqasm-v1-ast-gen.cpp.

◆ as_statement_list() [2/2]

const StatementList * cqasm::v1::ast::Node::as_statement_list ( ) const
virtual

Interprets this node to a node of type StatementList.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::StatementList.

Definition at line 1037 of file cqasm-v1-ast-gen.cpp.

◆ as_string_literal() [1/2]

StringLiteral * cqasm::v1::ast::Node::as_string_literal ( )
virtual

Interprets this node to a node of type StringLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::StringLiteral.

Definition at line 1045 of file cqasm-v1-ast-gen.cpp.

◆ as_string_literal() [2/2]

const StringLiteral * cqasm::v1::ast::Node::as_string_literal ( ) const
virtual

Interprets this node to a node of type StringLiteral.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::StringLiteral.

Definition at line 1053 of file cqasm-v1-ast-gen.cpp.

◆ as_structured() [1/2]

Structured * cqasm::v1::ast::Node::as_structured ( )
virtual

Interprets this node to a node of type Structured.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Structured.

Definition at line 1061 of file cqasm-v1-ast-gen.cpp.

◆ as_structured() [2/2]

const Structured * cqasm::v1::ast::Node::as_structured ( ) const
virtual

Interprets this node to a node of type Structured.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Structured.

Definition at line 1069 of file cqasm-v1-ast-gen.cpp.

◆ as_subcircuit() [1/2]

Subcircuit * cqasm::v1::ast::Node::as_subcircuit ( )
virtual

Interprets this node to a node of type Subcircuit.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Subcircuit.

Definition at line 1077 of file cqasm-v1-ast-gen.cpp.

◆ as_subcircuit() [2/2]

const Subcircuit * cqasm::v1::ast::Node::as_subcircuit ( ) const
virtual

Interprets this node to a node of type Subcircuit.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Subcircuit.

Definition at line 1085 of file cqasm-v1-ast-gen.cpp.

◆ as_subtract() [1/2]

Subtract * cqasm::v1::ast::Node::as_subtract ( )
virtual

Interprets this node to a node of type Subtract.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Subtract.

Definition at line 1093 of file cqasm-v1-ast-gen.cpp.

◆ as_subtract() [2/2]

const Subtract * cqasm::v1::ast::Node::as_subtract ( ) const
virtual

Interprets this node to a node of type Subtract.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Subtract.

Definition at line 1101 of file cqasm-v1-ast-gen.cpp.

◆ as_ternary_cond() [1/2]

TernaryCond * cqasm::v1::ast::Node::as_ternary_cond ( )
virtual

Interprets this node to a node of type TernaryCond.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::TernaryCond.

Definition at line 1109 of file cqasm-v1-ast-gen.cpp.

◆ as_ternary_cond() [2/2]

const TernaryCond * cqasm::v1::ast::Node::as_ternary_cond ( ) const
virtual

Interprets this node to a node of type TernaryCond.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::TernaryCond.

Definition at line 1117 of file cqasm-v1-ast-gen.cpp.

◆ as_unary_op() [1/2]

UnaryOp * cqasm::v1::ast::Node::as_unary_op ( )
virtual

Interprets this node to a node of type UnaryOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::UnaryOp.

Definition at line 1125 of file cqasm-v1-ast-gen.cpp.

◆ as_unary_op() [2/2]

const UnaryOp * cqasm::v1::ast::Node::as_unary_op ( ) const
virtual

Interprets this node to a node of type UnaryOp.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::UnaryOp.

Definition at line 1133 of file cqasm-v1-ast-gen.cpp.

◆ as_variables() [1/2]

Variables * cqasm::v1::ast::Node::as_variables ( )
virtual

Interprets this node to a node of type Variables.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Variables.

Definition at line 1141 of file cqasm-v1-ast-gen.cpp.

◆ as_variables() [2/2]

const Variables * cqasm::v1::ast::Node::as_variables ( ) const
virtual

Interprets this node to a node of type Variables.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Variables.

Definition at line 1149 of file cqasm-v1-ast-gen.cpp.

◆ as_version() [1/2]

Version * cqasm::v1::ast::Node::as_version ( )
virtual

Interprets this node to a node of type Version.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Version.

Definition at line 1157 of file cqasm-v1-ast-gen.cpp.

◆ as_version() [2/2]

const Version * cqasm::v1::ast::Node::as_version ( ) const
virtual

Interprets this node to a node of type Version.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::Version.

Definition at line 1165 of file cqasm-v1-ast-gen.cpp.

◆ as_while_loop() [1/2]

WhileLoop * cqasm::v1::ast::Node::as_while_loop ( )
virtual

Interprets this node to a node of type WhileLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::WhileLoop.

Definition at line 1173 of file cqasm-v1-ast-gen.cpp.

◆ as_while_loop() [2/2]

const WhileLoop * cqasm::v1::ast::Node::as_while_loop ( ) const
virtual

Interprets this node to a node of type WhileLoop.

Returns null if it has the wrong type.

Reimplemented in cqasm::v1::ast::WhileLoop.

Definition at line 1181 of file cqasm-v1-ast-gen.cpp.

◆ serialize()

virtual void cqasm::v1::ast::Node::serialize ( ::tree::cbor::MapWriter &  map,
const ::tree::base::PointerMap &  ids 
) const
pure virtual

Serializes this node to the given map.

Implemented in cqasm::v1::ast::WhileLoop, cqasm::v1::ast::Version, cqasm::v1::ast::Variables, cqasm::v1::ast::TernaryCond, cqasm::v1::ast::Subtract, cqasm::v1::ast::Subcircuit, cqasm::v1::ast::StringLiteral, cqasm::v1::ast::StatementList, cqasm::v1::ast::ShiftRightLogic, cqasm::v1::ast::ShiftRightArith, cqasm::v1::ast::ShiftLeft, cqasm::v1::ast::RepeatUntilLoop, cqasm::v1::ast::Program, cqasm::v1::ast::Power, cqasm::v1::ast::Negate, cqasm::v1::ast::Multiply, cqasm::v1::ast::Modulo, cqasm::v1::ast::MatrixLiteral, cqasm::v1::ast::Mapping, cqasm::v1::ast::LogicalXor, cqasm::v1::ast::LogicalOr, cqasm::v1::ast::LogicalNot, cqasm::v1::ast::LogicalAnd, cqasm::v1::ast::JsonLiteral, cqasm::v1::ast::IntegerLiteral, cqasm::v1::ast::IntDivide, cqasm::v1::ast::Instruction, cqasm::v1::ast::IndexRange, cqasm::v1::ast::IndexList, cqasm::v1::ast::IndexItem, cqasm::v1::ast::Index, cqasm::v1::ast::IfElseBranch, cqasm::v1::ast::IfElse, cqasm::v1::ast::Identifier, cqasm::v1::ast::FunctionCall, cqasm::v1::ast::ForeachLoop, cqasm::v1::ast::ForLoop, cqasm::v1::ast::FloatLiteral, cqasm::v1::ast::ExpressionList, cqasm::v1::ast::ErroneousStatement, cqasm::v1::ast::ErroneousProgram, cqasm::v1::ast::ErroneousExpression, cqasm::v1::ast::Divide, cqasm::v1::ast::ContinueStatement, cqasm::v1::ast::CmpNe, cqasm::v1::ast::CmpLt, cqasm::v1::ast::CmpLe, cqasm::v1::ast::CmpGt, cqasm::v1::ast::CmpGe, cqasm::v1::ast::CmpEq, cqasm::v1::ast::Bundle, cqasm::v1::ast::BreakStatement, cqasm::v1::ast::BitwiseXor, cqasm::v1::ast::BitwiseOr, cqasm::v1::ast::BitwiseNot, cqasm::v1::ast::BitwiseAnd, cqasm::v1::ast::Assignment, cqasm::v1::ast::AnnotationData, and cqasm::v1::ast::Add.

◆ deserialize()

std::shared_ptr< Node > cqasm::v1::ast::Node::deserialize ( const ::tree::cbor::MapReader &  map,
::tree::base::IdentifierMap &  ids 
)
static

Deserializes the given node.

Writes a debug dump of this node to the given stream.

Definition at line 1188 of file cqasm-v1-ast-gen.cpp.

◆ visit() [2/8]

void cqasm::v1::ast::Node::visit ( Visitor< void > &  visitor)

Visit this object.

Definition at line 13751 of file cqasm-v1-ast-gen.cpp.

◆ visit() [3/8]

template<>
void cqasm::v1::ast::Node::visit ( Visitor< void > &  visitor)

Visit this object.

Definition at line 5741 of file cqasm-v1-semantic-gen.cpp.

◆ visit() [4/8]

template<>
void cqasm::v1::ast::Node::visit ( Visitor< void > &  visitor)

Visit this object.

Definition at line 2220 of file cqasm-v1-types-gen.cpp.

◆ visit() [5/8]

template<>
void cqasm::v1::ast::Node::visit ( Visitor< void > &  visitor)

Visit this object.

Definition at line 2811 of file cqasm-v1-values-gen.cpp.

◆ visit() [6/8]

template<>
void cqasm::v1::ast::Node::visit ( Visitor< void > &  visitor)

Visit this object.

◆ visit() [7/8]

template<>
void cqasm::v1::ast::Node::visit ( Visitor< void > &  visitor)

Visit this object.

◆ visit() [8/8]

template<>
void cqasm::v1::ast::Node::visit ( Visitor< void > &  visitor)

Visit this object.


The documentation for this class was generated from the following files: