sun::ast::ArrayDimension

sun::ast::ArrayDimension

struct · Source (opens in a new tab)

struct sun::ast::ArrayDimension

One size of an array type: 5 in array<T, 5> or N in array<T, N>.

A size is written as a number or as the name of a constant, possibly through its module (limits.N), never as an expression.

Public Functions

isNamed

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

bool sun::ast::ArrayDimension::isNamed() const

True when the size was written as the name of a constant.

operator==

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

bool sun::ast::ArrayDimension::operator==(const ArrayDimension &other) const

Two sizes are the same when they were written the same way.

Related: ArrayDimension

toString

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

std::string sun::ast::ArrayDimension::toString() const

The size as written: the constant's name, or the number.

Public Fields

constantName

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

std::string sun::ast::ArrayDimension::constantName

No documentation comment.

position

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

sun::support::Position sun::ast::ArrayDimension::position {}

No documentation comment.

Related: sun::support::Position

size

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

std::optional<size_t> sun::ast::ArrayDimension::size

No documentation comment.