Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::UnaryExpression Class Reference

Represents a unary operator expression. More...

#include <bond/compiler/parsenodes.h>

Inheritance diagram for Bond::UnaryExpression:
Bond::Expression Bond::ListParseNode Bond::ParseNode

Public Member Functions

 UnaryExpression (const Token *op, Expression *rhs)
 Constructs a unary expression.
virtual ~UnaryExpression ()
virtual void Accept (ParseNodeVisitor &visitor) override
 Dispatches this node to the given visitor.
virtual void Accept (ParseNodeVisitor &visitor) const override
 Dispatches this node to the given visitor.
virtual const Token * GetContextToken () const override
 Returns the token used as source context for diagnostics.
const Token * GetOperator () const
 Returns the unary operator token.
Expression * GetRhs ()
 Returns the operand expression.
const Expression * GetRhs () const
 Returns the operand expression.
Public Member Functions inherited from Bond::Expression
virtual ~Expression ()
const TypeDescriptor & GetTypeDescriptor () const
 Returns the expression's type descriptor.
void SetTypeDescriptor (const TypeDescriptor &descriptor)
 Sets the expression's type descriptor.
const TypeAndValue & GetTypeAndValue () const
 Returns type and value metadata for the expression.
TypeAndValue & GetTypeAndValue ()
 Returns mutable type and value metadata for the expression.
Public Member Functions inherited from Bond::ListParseNode
virtual ~ListParseNode ()
ListParseNode * GetNextNode ()
 Returns the next node in the list.
const ListParseNode * GetNextNode () const
 Returns the next node in the list.
void SetNextNode (ListParseNode *next)
 Sets the next node in the list.
Public Member Functions inherited from Bond::ParseNode
virtual ~ParseNode ()

Additional Inherited Members

Protected Member Functions inherited from Bond::Expression
 Expression ()
Protected Member Functions inherited from Bond::ListParseNode
 ListParseNode ()
Protected Member Functions inherited from Bond::ParseNode
 ParseNode ()

Detailed Description

Represents a unary operator expression.

Constructor & Destructor Documentation

◆ UnaryExpression()

Bond::UnaryExpression::UnaryExpression ( const Token * op,
Expression * rhs )
inline

Constructs a unary expression.

Parameters
opUnary operator token.
rhsOperand expression.

◆ ~UnaryExpression()

virtual Bond::UnaryExpression::~UnaryExpression ( )
inlinevirtual

Member Function Documentation

◆ Accept() [1/2]

virtual void Bond::UnaryExpression::Accept ( ParseNodeVisitor & visitor) const
inlineoverridevirtual

Dispatches this node to the given visitor.

Parameters
visitorVisitor that handles this node type.

Implements Bond::ParseNode.

◆ Accept() [2/2]

virtual void Bond::UnaryExpression::Accept ( ParseNodeVisitor & visitor)
inlineoverridevirtual

Dispatches this node to the given visitor.

Parameters
visitorVisitor that handles this node type.

Implements Bond::ParseNode.

◆ GetContextToken()

virtual const Token * Bond::UnaryExpression::GetContextToken ( ) const
inlineoverridevirtual

Returns the token used as source context for diagnostics.

Returns
A token associated with this node, or null if no token applies.

Implements Bond::ParseNode.

◆ GetOperator()

const Token * Bond::UnaryExpression::GetOperator ( ) const
inline

Returns the unary operator token.

◆ GetRhs() [1/2]

Expression * Bond::UnaryExpression::GetRhs ( )
inline

Returns the operand expression.

◆ GetRhs() [2/2]

const Expression * Bond::UnaryExpression::GetRhs ( ) const
inline

Returns the operand expression.


The documentation for this class was generated from the following file:
  • include/bond/compiler/parsenodes.h