Parameter

Members

Aliases

ForeachDg
alias ForeachDg = int delegate(size_t paramidx, Parameter param)

Type of delegate when iterating solely on the parameters

SemanticForeachDg
alias SemanticForeachDg = int delegate(size_t oidx, Parameter oparam, size_t eidx, Parameter eparam)

Type of delegate when iterating on both the original set of parameters, and the type tuple. Useful for semantic analysis. 'o' stands for 'original' and 'e' stands for 'expanded'.

Functions

isCovariant
bool isCovariant(bool returnByRef, Parameter p, bool previewIn)

Compute covariance of parameters this and p as determined by the storage classes of both.

isLazyArray
Type isLazyArray()

Determine if parameter is a lazy array of delegates. If so, return the return type of those delegates. If not, return NULL.

isReference
bool isReference()

Static functions

_foreach
int _foreach(Parameters* parameters, ForeachDg dg)
int _foreach(Parameters* parameters, SemanticForeachDg dg)

Expands tuples in args in depth first order. Calls dg(void *ctx, size_t argidx, Parameter *arg) for each Parameter. If dg returns !=0, stops and returns that value else returns 0. Use this function to avoid the O(N + N^2/2) complexity of calculating dim and calling N times getNth.

dim
size_t dim(Parameters* parameters)

Determine number of arguments, folding in tuples.

getNth
Parameter getNth(Parameters* parameters, size_t nth)

Get nth Parameter, folding in tuples.

Inherited Members

From ASTNode

accept
void accept(Visitor v)

Visits this AST node using the given visitor.

Suggestion Box / Bug Report