sun::ast::UnaryExprAST
class · Source (opens in a new tab)
class sun::ast::UnaryExprAST : public sun::ast::ExprASTAn operation applied to a single operand expression.
Inherits
- sun::ast::ExprAST (public)
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.
dotLabel
public · function · Source (opens in a new tab)
std::string sun::ast::UnaryExprAST::dotLabel() const overrideReturns 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) overrideVisits 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() constReturns the operator applied by this expression.
Related: Token
getOperand
public · function · Source (opens in a new tab)
const ExprAST * sun::ast::UnaryExprAST::getOperand() constReturns the operand stored by this object.
Related: ExprAST
getType
public · function · Source (opens in a new tab)
ASTNodeType sun::ast::UnaryExprAST::getType() const overrideReturns 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 overrideReturns 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::OperandNo documentation comment.
Related: ExprAST
op
private · variable · Source (opens in a new tab)
Token sun::ast::UnaryExprAST::opNo documentation comment.
Related: Token