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

Represents sizeof/alignof style property queries. More...

#include <bond/compiler/parsenodes.h>

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

Public Member Functions

 PropertyofExpression (const Token *op, TypeDescriptor *targetTypeDescriptor)
 Constructs a property query on a type.
 PropertyofExpression (const Token *op, Expression *rhs)
 Constructs a property query on an expression.
virtual ~PropertyofExpression ()
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 TokenGetContextToken () const override
 Returns the token used as source context for diagnostics.
const TokenGetOperator () const
 Returns the property operator token.
const TypeDescriptorGetTargetTypeDescriptor () const
 Returns the target type descriptor.
TypeDescriptorGetTargetTypeDescriptor ()
 Returns the target type descriptor.
ExpressionGetRhs ()
 Returns the target expression.
const ExpressionGetRhs () const
 Returns the target expression.
bool IsAlignof () const
 Returns true if this is an alignof query.
bool IsSizeof () const
 Returns true if this is a sizeof query.
Public Member Functions inherited from Bond::Expression
virtual ~Expression ()
const TypeDescriptorGetTypeDescriptor () const
 Returns the expression's type descriptor.
void SetTypeDescriptor (const TypeDescriptor &descriptor)
 Sets the expression's type descriptor.
const TypeAndValueGetTypeAndValue () const
 Returns type and value metadata for the expression.
TypeAndValueGetTypeAndValue ()
 Returns mutable type and value metadata for the expression.
Public Member Functions inherited from Bond::ListParseNode
virtual ~ListParseNode ()
ListParseNodeGetNextNode ()
 Returns the next node in the list.
const ListParseNodeGetNextNode () 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 sizeof/alignof style property queries.

Constructor & Destructor Documentation

◆ PropertyofExpression() [1/2]

Bond::PropertyofExpression::PropertyofExpression ( const Token * op,
TypeDescriptor * targetTypeDescriptor )
inline

Constructs a property query on a type.

Parameters
opProperty operator token.
targetTypeDescriptorType descriptor to inspect.

◆ PropertyofExpression() [2/2]

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

Constructs a property query on an expression.

Parameters
opProperty operator token.
rhsExpression to inspect.

◆ ~PropertyofExpression()

virtual Bond::PropertyofExpression::~PropertyofExpression ( )
inlinevirtual

Member Function Documentation

◆ Accept() [1/2]

virtual void Bond::PropertyofExpression::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::PropertyofExpression::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::PropertyofExpression::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::PropertyofExpression::GetOperator ( ) const
inline

Returns the property operator token.

◆ GetRhs() [1/2]

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

Returns the target expression.

◆ GetRhs() [2/2]

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

Returns the target expression.

◆ GetTargetTypeDescriptor() [1/2]

TypeDescriptor * Bond::PropertyofExpression::GetTargetTypeDescriptor ( )
inline

Returns the target type descriptor.

◆ GetTargetTypeDescriptor() [2/2]

const TypeDescriptor * Bond::PropertyofExpression::GetTargetTypeDescriptor ( ) const
inline

Returns the target type descriptor.

◆ IsAlignof()

bool Bond::PropertyofExpression::IsAlignof ( ) const
inline

Returns true if this is an alignof query.

◆ IsSizeof()

bool Bond::PropertyofExpression::IsSizeof ( ) const
inline

Returns true if this is a sizeof query.


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