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

Node representing a prefix unary operation. More...

#include <Compiler_AST.H>

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

Public Member Functions

 Compiler_Unary_Expr (const Compiler_Token_Kind op_kind=Compiler_Token_Kind::Invalid, const Source_Span &op_sp={}, Compiler_Expr *expr=nullptr) noexcept
 Constructs a unary 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., Minus, Not).
 
Source_Span operator_span
 Location of the operator token.
 
Compiler_Expr * operand = nullptr
 Expression being operated upon.
 
- 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 a prefix unary operation.

Examples: -x, !flag, ~mask.

Definition at line 797 of file Compiler_AST.H.

Constructor & Destructor Documentation

◆ Compiler_Unary_Expr()

Aleph::Compiler_Unary_Expr::Compiler_Unary_Expr ( const Compiler_Token_Kind  op_kind = Compiler_Token_Kind::Invalid,
const Source_Span &  op_sp = {},
Compiler_Expr *  expr = nullptr 
)
inlinenoexcept

Constructs a unary expression.

Definition at line 804 of file Compiler_AST.H.

Member Data Documentation

◆ op

Compiler_Token_Kind Aleph::Compiler_Unary_Expr::op = Compiler_Token_Kind::Invalid

Operator kind (e.g., Minus, Not).

Definition at line 799 of file Compiler_AST.H.

◆ operand

Compiler_Expr* Aleph::Compiler_Unary_Expr::operand = nullptr

Expression being operated upon.

Definition at line 801 of file Compiler_AST.H.

◆ operator_span

Source_Span Aleph::Compiler_Unary_Expr::operator_span

Location of the operator token.

Definition at line 800 of file Compiler_AST.H.


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