polyglot.ext.carray.ast
Class CarrayAssign_c

java.lang.Object
  extended bypolyglot.ext.jl.ast.Node_c
      extended bypolyglot.ext.jl.ast.Term_c
          extended bypolyglot.ext.jl.ast.Expr_c
              extended bypolyglot.ext.jl.ast.Assign_c
                  extended bypolyglot.ext.carray.ast.CarrayAssign_c
All Implemented Interfaces:
Assign, java.lang.Cloneable, Copy, Expr, JL, Node, NodeOps, Prefix, Receiver, Term, Typed

public class CarrayAssign_c
extends Assign_c

An Assign represents a Java assignment expression. This class extends Assign_c to implement the restriction that elements of a const array cannot be modified.


Nested Class Summary
 
Nested classes inherited from class polyglot.ast.Assign
Assign.Operator
 
Field Summary
 
Fields inherited from class polyglot.ext.jl.ast.Assign_c
left, op, right
 
Fields inherited from class polyglot.ext.jl.ast.Expr_c
type
 
Fields inherited from class polyglot.ext.jl.ast.Term_c
reachable
 
Fields inherited from class polyglot.ext.jl.ast.Node_c
del, ext, position
 
Fields inherited from interface polyglot.ast.Assign
ADD_ASSIGN, ASSIGN, BIT_AND_ASSIGN, BIT_OR_ASSIGN, BIT_XOR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN, MUL_ASSIGN, SHL_ASSIGN, SHR_ASSIGN, SUB_ASSIGN, USHR_ASSIGN
 
Constructor Summary
CarrayAssign_c(Position pos, Expr left, Assign.Operator op, Expr right)
           
 
Method Summary
 Node typeCheck(TypeChecker tc)
          Type check the expression.
 
Methods inherited from class polyglot.ext.jl.ast.Assign_c
acceptCFG, acceptCFGAssign, acceptCFGOpAssign, childExpectedType, dump, entry, left, left, operator, operator, precedence, prettyPrint, reconstruct, right, right, throwsArithmeticException, throwTypes, toString, visitChildren
 
Methods inherited from class polyglot.ext.jl.ast.Expr_c
booleanValue, buildTypes, byteValue, charValue, constantValue, doubleValue, floatValue, intValue, isConstant, longValue, printSubExpr, printSubExpr, shortValue, stringValue, type, type
 
Methods inherited from class polyglot.ext.jl.ast.Term_c
listEntry, reachable, reachable
 
Methods inherited from class polyglot.ext.jl.ast.Node_c
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypesEnter, buildTypesOverride, copy, del, del, disambiguate, disambiguateEnter, disambiguateOverride, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.ast.Expr
constantValue, isConstant, printSubExpr, printSubExpr, type
 
Methods inherited from interface polyglot.ast.Node
del, del, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, translate, typeCheckEnter
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.ast.Typed
type
 
Methods inherited from interface polyglot.ast.Term
reachable, reachable
 

Constructor Detail

CarrayAssign_c

public CarrayAssign_c(Position pos,
                      Expr left,
                      Assign.Operator op,
                      Expr right)
Method Detail

typeCheck

public Node typeCheck(TypeChecker tc)
               throws SemanticException
Type check the expression. The only change is that elements of a const array cannot be modified.

Specified by:
typeCheck in interface NodeOps
Overrides:
typeCheck in class Assign_c
Throws:
SemanticException