public class TypeChecker extends java.lang.Object implements TypeVisitor
Modifier and Type | Field and Description |
---|---|
static BOOLEAN |
BOOLEAN |
int |
errors |
static INT |
INT |
static NIL |
NIL |
static STRING |
STRING |
static VOID |
VOID |
Constructor and Description |
---|
TypeChecker() |
public static final BOOLEAN BOOLEAN
public static final INT INT
public static final NIL NIL
public static final VOID VOID
public static final STRING STRING
public int errors
public Type visit(Program ast)
visit
in interface TypeVisitor
public Type visit(ClassDecl ast)
visit
in interface TypeVisitor
public Type visit(ThreadDecl ast)
visit
in interface TypeVisitor
public Type visit(MethodDecl ast)
visit
in interface TypeVisitor
public Type visit(VoidDecl ast)
visit
in interface TypeVisitor
public Type visit(VarDecl ast)
visit
in interface TypeVisitor
public Type visit(java.util.AbstractList list)
TypeVisitor
visit
in interface TypeVisitor
public Type visit(AssignStmt ast)
visit
in interface TypeVisitor
public Type visit(BlockStmt ast)
visit
in interface TypeVisitor
public Type visit(IfStmt ast)
visit
in interface TypeVisitor
public Type visit(XinuCallStmt ast)
visit
in interface TypeVisitor
public Type visit(XinuCallExpr ast)
visit
in interface TypeVisitor
public Type visit(WhileStmt ast)
visit
in interface TypeVisitor
public Type visit(AddExpr ast)
visit
in interface TypeVisitor
public Type visit(AndExpr ast)
visit
in interface TypeVisitor
public Type visit(DivExpr ast)
visit
in interface TypeVisitor
public Type visit(MulExpr ast)
visit
in interface TypeVisitor
public Type visit(SubExpr ast)
visit
in interface TypeVisitor
public Type visit(EqualExpr ast)
visit
in interface TypeVisitor
public Type visit(GreaterExpr ast)
visit
in interface TypeVisitor
public Type visit(LesserExpr ast)
visit
in interface TypeVisitor
public Type visit(NotEqExpr ast)
visit
in interface TypeVisitor
public Type visit(NotExpr ast)
visit
in interface TypeVisitor
public Type visit(NegExpr ast)
visit
in interface TypeVisitor
public Type visit(OrExpr ast)
visit
in interface TypeVisitor
public Type visit(ArrayExpr ast)
visit
in interface TypeVisitor
public Type visit(CallExpr ast)
visit
in interface TypeVisitor
public Type visit(FieldExpr ast)
visit
in interface TypeVisitor
public Type visit(Formal ast)
visit
in interface TypeVisitor
public Type visit(IdentifierExpr ast)
visit
in interface TypeVisitor
public Type visit(NewArrayExpr ast)
visit
in interface TypeVisitor
public Type visit(NewObjectExpr ast)
visit
in interface TypeVisitor
public Type visit(NullExpr ast)
visit
in interface TypeVisitor
public Type visit(ThisExpr ast)
visit
in interface TypeVisitor
public Type visit(ArrayType ast)
visit
in interface TypeVisitor
public Type visit(IdentifierType ast)
visit
in interface TypeVisitor
public Type visit(IntegerType ast)
visit
in interface TypeVisitor
public Type visit(IntegerLiteral ast)
visit
in interface TypeVisitor
public Type visit(StringLiteral ast)
visit
in interface TypeVisitor
public Type visit(BooleanType ast)
visit
in interface TypeVisitor
public Type visit(FalseExpr ast)
visit
in interface TypeVisitor
public Type visit(TrueExpr ast)
visit
in interface TypeVisitor