|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.javalanglevels.tree.JExpressionIFAbstractVisitor<TypeData>
edu.rice.cs.javalanglevels.LValueTypeChecker
public class LValueTypeChecker
Do what is necessary to type check the lhs of an assignment expression, i.e., make sure that what is on the lhs is something that can be assigned to, and if so, return its type.
| Nested Class Summary | |
|---|---|
static class |
LValueTypeChecker.LValueTypeCheckerTest
Test the methods defined in the above class |
| Constructor Summary | |
|---|---|
LValueTypeChecker(SpecialTypeChecker bob)
|
|
| Method Summary | |
|---|---|
TypeData |
defaultCase(JExpressionIF that)
Most expressions cannot appear on the lhs of an assignment: give an appropriate error |
TypeData |
forArrayAccess(ArrayAccess that)
Array accesses can appear on the lhs, so check to see if the array can be assigned to |
TypeData |
forIncrementExpression(IncrementExpression that)
An increment expression is a special case that cannot appear on the lhs |
TypeData |
forNameReference(NameReference that)
|
TypeData |
forParenthesized(Parenthesized that)
Recur on the value stored in the parentheses |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LValueTypeChecker(SpecialTypeChecker bob)
| Method Detail |
|---|
public TypeData defaultCase(JExpressionIF that)
defaultCase in class JExpressionIFAbstractVisitor<TypeData>public TypeData forIncrementExpression(IncrementExpression that)
forIncrementExpression in class JExpressionIFAbstractVisitor<TypeData>public TypeData forNameReference(NameReference that)
forNameReference in class JExpressionIFAbstractVisitor<TypeData>public TypeData forArrayAccess(ArrayAccess that)
forArrayAccess in interface JExpressionIFVisitor<TypeData>forArrayAccess in class JExpressionIFAbstractVisitor<TypeData>public TypeData forParenthesized(Parenthesized that)
forParenthesized in interface JExpressionIFVisitor<TypeData>forParenthesized in class JExpressionIFAbstractVisitor<TypeData>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||