sun::ast::UnaryExprAST

sun::ast::UnaryExprAST

class · Source (opens in a new tab)

class sun::ast::UnaryExprAST : public sun::ast::ExprAST

An operation applied to a single operand expression.

Inherits

Public Functions

UnaryExprAST

public · function · Source (opens in a new tab)

sun::ast::UnaryExprAST::UnaryExprAST(Token op, std::unique_ptr< ExprAST > operand)

Creates this syntax node and takes ownership of any supplied child expressions.

Related: Token, ExprAST

dotLabel

public · function · Source (opens in a new tab)

std::string sun::ast::UnaryExprAST::dotLabel() const override

Returns the node label used in syntax-tree graph visualizations.

forEachChildSlot

public · function · Source (opens in a new tab)

void sun::ast::UnaryExprAST::forEachChildSlot(const ChildSlotFn &fn) override

Visits replaceable child expressions so tree passes can rewrite them in place.

Related: ChildSlotFn

getOp

public · function · Source (opens in a new tab)

Token sun::ast::UnaryExprAST::getOp() const

Returns the operator applied by this expression.

Related: Token

getOperand

public · function · Source (opens in a new tab)

const ExprAST * sun::ast::UnaryExprAST::getOperand() const

Returns the operand stored by this object.

Related: ExprAST

getType

public · function · Source (opens in a new tab)

ASTNodeType sun::ast::UnaryExprAST::getType() const override

Returns the syntax-node kind used to dispatch tree visitors.

Related: ASTNodeType

toString

public · function · Source (opens in a new tab)

std::string sun::ast::UnaryExprAST::toString() const override

Returns a readable representation for diagnostics and debugging.

Private Fields

Operand

private · variable · Source (opens in a new tab)

std::unique_ptr<ExprAST> sun::ast::UnaryExprAST::Operand

No documentation comment.

Related: ExprAST

op

private · variable · Source (opens in a new tab)

Token sun::ast::UnaryExprAST::op

No documentation comment.

Related: Token