jltools.ext.jl.ast
Class ArrayInit_c

java.lang.Object
  |
  +--jltools.ext.jl.ast.Node_c
        |
        +--jltools.ext.jl.ast.Expr_c
              |
              +--jltools.ext.jl.ast.ArrayInit_c
All Implemented Interfaces:
ArrayInit, java.lang.Cloneable, Copy, Expr, Node, Prefix, Receiver, java.io.Serializable, Typed

public class ArrayInit_c
extends Expr_c
implements ArrayInit

An 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).

See Also:
Serialized Form

Inner classes inherited from class jltools.ext.jl.ast.Node_c
Node_c.StringCodeWriter
 
Field Summary
protected  java.util.List elements
           
 
Fields inherited from class jltools.ext.jl.ast.Expr_c
type
 
Fields inherited from class jltools.ext.jl.ast.Node_c
ext, position
 
Constructor Summary
ArrayInit_c(Ext ext, Position pos, java.util.List elements)
           
 
Method Summary
 java.util.List elements()
          Get the elements of the initializer.
 ArrayInit elements(java.util.List elements)
          Set the elements of the initializer.
protected  ArrayInit_c reconstruct(java.util.List elements)
          Reconstruct the initializer.
 java.lang.String toString()
           
 void translate_(CodeWriter w, Translator tr)
          Write the initializer to an output file.
 Node typeCheck_(TypeChecker tc)
          Type check the initializer.
 Node visitChildren(NodeVisitor v)
          Visit the children of the initializer.
 
Methods inherited from class jltools.ext.jl.ast.Expr_c
buildTypes_, dump, precedence, reconstructTypes_, translateSubexpr, type, type
 
Methods inherited from class jltools.ext.jl.ast.Node_c
buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, enterScope, exceptionCheck_, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, leaveScope, position, position, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck, typeCheckOverride_, typeCheckOverride, visit, visitList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jltools.ast.Expr
precedence, type
 
Methods inherited from interface jltools.ast.Node
buildTypes_, buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, enterScope, exceptionCheck_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, leaveScope, position, position, reconstructTypes_, typeCheckOverride_, visit
 
Methods inherited from interface jltools.ast.Typed
type
 

Field Detail

elements

protected java.util.List elements
Constructor Detail

ArrayInit_c

public ArrayInit_c(Ext ext,
                   Position pos,
                   java.util.List elements)
Method Detail

elements

public java.util.List elements()
Get the elements of the initializer.
Specified by:
elements in interface ArrayInit

elements

public ArrayInit elements(java.util.List elements)
Set the elements of the initializer.
Specified by:
elements in interface ArrayInit

reconstruct

protected ArrayInit_c reconstruct(java.util.List elements)
Reconstruct the initializer.

visitChildren

public Node visitChildren(NodeVisitor v)
Visit the children of the initializer.
Specified by:
visitChildren in interface Node
Overrides:
visitChildren in class Node_c

typeCheck_

public Node typeCheck_(TypeChecker tc)
                throws SemanticException
Type check the initializer.
Specified by:
typeCheck_ in interface Node
Overrides:
typeCheck_ in class Node_c

toString

public java.lang.String toString()
Overrides:
toString in class Node_c

translate_

public void translate_(CodeWriter w,
                       Translator tr)
Write the initializer to an output file.
Specified by:
translate_ in interface Node
Overrides:
translate_ in class Node_c
Following copied from interface: jltools.ast.Node
Parameters:
w - The code writer to which to write.
tr - The translation pass. This is not a visitor.