Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Compiler_Binary_Expr Struct Referencefinal

Node representing an infix binary operation. More...

#include <Compiler_AST.H>

Inheritance diagram for Aleph::Compiler_Binary_Expr:
[legend]
Collaboration diagram for Aleph::Compiler_Binary_Expr:
[legend]

Public Member Functions

 Compiler_Binary_Expr (Compiler_Expr *lhs=nullptr, const Compiler_Token_Kind op_kind=Compiler_Token_Kind::Invalid, const Source_Span &op_sp={}, Compiler_Expr *rhs=nullptr) noexcept
 Constructs a binary expression.
 
- Public Member Functions inherited from Aleph::Compiler_Expr
 Compiler_Expr (const Compiler_Expr_Kind k=Compiler_Expr_Kind::Invalid, const Source_Span &sp={}) noexcept
 Constructs an expression base.
 
- Public Member Functions inherited from Aleph::Compiler_Ast_Node
 Compiler_Ast_Node (const Source_Span &sp={}) noexcept
 Constructs a node with an optional span.
 
virtual ~Compiler_Ast_Node () noexcept=default
 Virtual destructor to ensure proper cleanup of derived nodes.
 

Public Attributes

Compiler_Token_Kind op = Compiler_Token_Kind::Invalid
 Operator kind (e.g., Plus, Equal).
 
Source_Span operator_span
 Location of the operator token.
 
Compiler_Expr * left = nullptr
 Left-hand side operand.
 
Compiler_Expr * right = nullptr
 Right-hand side operand.
 
- Public Attributes inherited from Aleph::Compiler_Expr
Compiler_Expr_Kind kind = Compiler_Expr_Kind::Invalid
 Specific expression type.
 
- Public Attributes inherited from Aleph::Compiler_Ast_Node
Source_Span span
 Source region covered by this node.
 

Detailed Description

Node representing an infix binary operation.

Examples: a + b, x * y, i < 10.

Definition at line 817 of file Compiler_AST.H.

Constructor & Destructor Documentation

◆ Compiler_Binary_Expr()

Aleph::Compiler_Binary_Expr::Compiler_Binary_Expr ( Compiler_Expr *  lhs = nullptr,
const Compiler_Token_Kind  op_kind = Compiler_Token_Kind::Invalid,
const Source_Span &  op_sp = {},
Compiler_Expr *  rhs = nullptr 
)
inlinenoexcept

Constructs a binary expression.

Definition at line 825 of file Compiler_AST.H.

Member Data Documentation

◆ left

Compiler_Expr* Aleph::Compiler_Binary_Expr::left = nullptr

Left-hand side operand.

Definition at line 821 of file Compiler_AST.H.

◆ op

Compiler_Token_Kind Aleph::Compiler_Binary_Expr::op = Compiler_Token_Kind::Invalid

Operator kind (e.g., Plus, Equal).

Definition at line 819 of file Compiler_AST.H.

◆ operator_span

Source_Span Aleph::Compiler_Binary_Expr::operator_span

Location of the operator token.

Definition at line 820 of file Compiler_AST.H.

◆ right

Compiler_Expr* Aleph::Compiler_Binary_Expr::right = nullptr

Right-hand side operand.

Definition at line 822 of file Compiler_AST.H.


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