public interface ArrayInit extends Expr
ArrayInit
is an immutable representation of
an array initializer, such as { 3, 1, { 4, 1, 5 } }. Note that
the elements of these array may be expressions of any type (e.g.,
Call
).Term.Instance
Modifier and Type | Method and Description |
---|---|
java.util.List<Expr> |
elements()
Get the initializer elements.
|
ArrayInit |
elements(java.util.List<Expr> elements)
Set the initializer elements.
|
void |
typeCheckElements(TypeChecker tc,
Type lhsType)
Type check the individual elements of the array initializer against the
left-hand-side type.
|
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
exceptions, exceptions, reachable, reachable
ArrayInit elements(java.util.List<Expr> elements)
elements
- A list of Expr
.void typeCheckElements(TypeChecker tc, Type lhsType) throws SemanticException
tc
- The type checking visitor.lhsType
- Type to compare against.SemanticException
- if there is a type error.