sun::ast::ArrayIndexAST

sun::ast::ArrayIndexAST

class · Source (opens in a new tab)

class sun::ast::ArrayIndexAST : public sun::ast::ExprAST

Array indexing: x[i] or x[i, j, k] for n-dimensional arrays (legacy) Uses comma-separated indices: x[0, 1] instead of x[0][1].

Inherits

Public Functions

ArrayIndexAST

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

sun::ast::ArrayIndexAST::ArrayIndexAST(std::unique_ptr< ExprAST > arr, std::vector< std::unique_ptr< ExprAST > > idxs)

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

Related: ExprAST

dotLabel

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

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

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

getArray

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

const ExprAST * sun::ast::ArrayIndexAST::getArray() const

Returns the array expression.

Related: ExprAST

getIndices

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

const std::vector< std::unique_ptr< ExprAST > > & sun::ast::ArrayIndexAST::getIndices() const

Provides the index expressions used to select array elements.

Related: ExprAST

getType

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

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

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

Related: ASTNodeType

numIndices

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

size_t sun::ast::ArrayIndexAST::numIndices() const

Returns the number of index expressions in this access.

toString

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

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

Returns a readable representation for diagnostics and debugging.

Private Fields

array

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

std::unique_ptr<ExprAST> sun::ast::ArrayIndexAST::array

No documentation comment.

Related: ExprAST

indices

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

std::vector<std::unique_ptr<ExprAST> > sun::ast::ArrayIndexAST::indices

No documentation comment.

Related: ExprAST