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

Represents member access on a struct-like value. More...

#include <bond/compiler/parsenodes.h>

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

Public Member Functions

 MemberExpression (const Token *op, const Token *memberName, Expression *lhs)
 Constructs a member access expression.
virtual ~MemberExpression ()
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 member access operator token.
const TokenGetMemberName () const
 Returns the member name token.
ExpressionGetLhs ()
 Returns the left-hand-side object expression.
const ExpressionGetLhs () const
 Returns the left-hand-side object expression.
const SymbolGetDefinition () const
 Returns resolved symbol definition for the member.
void SetDefinition (const Symbol *symbol)
 Sets resolved symbol definition for the member.
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 member access on a struct-like value.

Constructor & Destructor Documentation

◆ MemberExpression()

Bond::MemberExpression::MemberExpression ( const Token * op,
const Token * memberName,
Expression * lhs )
inline

Constructs a member access expression.

Parameters
opMember access operator token.
memberNameMember name token.
lhsLeft-hand-side object expression.

◆ ~MemberExpression()

virtual Bond::MemberExpression::~MemberExpression ( )
inlinevirtual

Member Function Documentation

◆ Accept() [1/2]

virtual void Bond::MemberExpression::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::MemberExpression::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::MemberExpression::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.

◆ GetDefinition()

const Symbol * Bond::MemberExpression::GetDefinition ( ) const
inline

Returns resolved symbol definition for the member.

◆ GetLhs() [1/2]

Expression * Bond::MemberExpression::GetLhs ( )
inline

Returns the left-hand-side object expression.

◆ GetLhs() [2/2]

const Expression * Bond::MemberExpression::GetLhs ( ) const
inline

Returns the left-hand-side object expression.

◆ GetMemberName()

const Token * Bond::MemberExpression::GetMemberName ( ) const
inline

Returns the member name token.

◆ GetOperator()

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

Returns the member access operator token.

◆ SetDefinition()

void Bond::MemberExpression::SetDefinition ( const Symbol * symbol)
inline

Sets resolved symbol definition for the member.

Parameters
symbolSymbol resolved for the member access.

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