summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--heat/HeatVisitor.java137
1 files changed, 80 insertions, 57 deletions
diff --git a/heat/HeatVisitor.java b/heat/HeatVisitor.java
index f099a43..02d10d4 100644
--- a/heat/HeatVisitor.java
+++ b/heat/HeatVisitor.java
@@ -6,7 +6,7 @@ import st.*;
import misc.*;
import java.util.*;
-public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
+public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<TypeBundle>> {
private SymbolTable symt;
@@ -19,7 +19,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
//
// Auto class visitors--probably don't need to be overridden.
//
- public TypeBundle visit(NodeList n, ArrayList<String> argu) {
+ public TypeBundle visit(NodeList n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
@@ -29,7 +29,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
return _ret;
}
- public TypeBundle visit(NodeListOptional n, ArrayList<String> argu) {
+ public TypeBundle visit(NodeListOptional n, ArrayList<TypeBundle> argu) {
if ( n.present() ) {
TypeBundle _ret=null;
int _count=0;
@@ -43,14 +43,14 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
return null;
}
- public TypeBundle visit(NodeOptional n, ArrayList<String> argu) {
+ public TypeBundle visit(NodeOptional n, ArrayList<TypeBundle> argu) {
if ( n.present() )
return n.node.accept(this,argu);
else
return null;
}
- public TypeBundle visit(NodeSequence n, ArrayList<String> argu) {
+ public TypeBundle visit(NodeSequence n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
int _count=0;
for ( Enumeration<Node> e = n.elements(); e.hasMoreElements(); ) {
@@ -60,7 +60,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
return _ret;
}
- public TypeBundle visit(NodeToken n, ArrayList<String> argu) { return null; }
+ public TypeBundle visit(NodeToken n, ArrayList<TypeBundle> argu) { return null; }
//
// User-generated visitor methods below
@@ -71,7 +71,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> ( TypeDeclaration() )*
* f2 -> <EOF>
*/
- public TypeBundle visit(Goal n, ArrayList<String> argu) {
+ public TypeBundle visit(Goal n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -106,7 +106,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f16 -> "}"
* f17 -> "}"
*/
- public TypeBundle visit(MainClass n, ArrayList<String> argu) {
+ public TypeBundle visit(MainClass n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f1.f0.tokenImage;
MinimalLogger.info(String.format("-> %s (%s)",
@@ -130,7 +130,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f0 -> ClassDeclaration()
* | ClassExtendsDeclaration()
*/
- public TypeBundle visit(TypeDeclaration n, ArrayList<String> argu) {
+ public TypeBundle visit(TypeDeclaration n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -151,7 +151,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f4 -> ( MethodDeclaration() )*
* f5 -> "}"
*/
- public TypeBundle visit(ClassDeclaration n, ArrayList<String> argu) {
+ public TypeBundle visit(ClassDeclaration n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f1.f0.tokenImage;
MinimalLogger.info(String.format("-> %s (%s)",
@@ -179,7 +179,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f6 -> ( MethodDeclaration() )*
* f7 -> "}"
*/
- public TypeBundle visit(ClassExtendsDeclaration n, ArrayList<String> argu) {
+ public TypeBundle visit(ClassExtendsDeclaration n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f1.f0.tokenImage;
String id0 = n.f3.f0.tokenImage;
@@ -203,7 +203,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> Identifier()
* f2 -> ";"
*/
- public TypeBundle visit(VarDeclaration n, ArrayList<String> argu) {
+ public TypeBundle visit(VarDeclaration n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f1.f0.tokenImage;
MinimalLogger.info(String.format("-> %s (%s)",
@@ -232,7 +232,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f11 -> ";"
* f12 -> "}"
*/
- public TypeBundle visit(MethodDeclaration n, ArrayList<String> argu) {
+ public TypeBundle visit(MethodDeclaration n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f2.f0.tokenImage;
MinimalLogger.info(String.format("-> %s (%s)",
@@ -241,7 +241,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
this.symt.setActive(TypeEnum.method, symt.getMethod(id));
///////////////////////////////////////////////////////////////
TypeBundle tb = n.f1.accept(this, argu);
- // n.f4.accept(this, para);
+ n.f4.accept(this, argu);
n.f7.accept(this, argu);
n.f8.accept(this, argu);
_ret = n.f10.accept(this, argu);
@@ -265,7 +265,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f0 -> FormalParameter()
* f1 -> ( FormalParameterRest() )*
*/
- public TypeBundle visit(FormalParameterList n, ArrayList<String> argu) {
+ public TypeBundle visit(FormalParameterList n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -283,7 +283,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f0 -> Type()
* f1 -> Identifier()
*/
- public TypeBundle visit(FormalParameter n, ArrayList<String> argu) {
+ public TypeBundle visit(FormalParameter n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f1.f0.tokenImage;
MinimalLogger.info(String.format("-> %s (%s)",
@@ -303,7 +303,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f0 -> ","
* f1 -> FormalParameter()
*/
- public TypeBundle visit(FormalParameterRest n, ArrayList<String> argu) {
+ public TypeBundle visit(FormalParameterRest n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -322,7 +322,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* | IntegerType()
* | Identifier()
*/
- public TypeBundle visit(Type n, ArrayList<String> argu) {
+ public TypeBundle visit(Type n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -343,7 +343,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> "["
* f2 -> "]"
*/
- public TypeBundle visit(ArrayType n, ArrayList<String> argu) {
+ public TypeBundle visit(ArrayType n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -359,7 +359,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
/**
* f0 -> "boolean"
*/
- public TypeBundle visit(BooleanType n, ArrayList<String> argu) {
+ public TypeBundle visit(BooleanType n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -375,7 +375,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
/**
* f0 -> "int"
*/
- public TypeBundle visit(IntegerType n, ArrayList<String> argu) {
+ public TypeBundle visit(IntegerType n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -396,7 +396,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* | WhileStatement()
* | PrintStatement()
*/
- public TypeBundle visit(Statement n, ArrayList<String> argu) {
+ public TypeBundle visit(Statement n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -414,7 +414,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> ( Statement() )*
* f2 -> "}"
*/
- public TypeBundle visit(Block n, ArrayList<String> argu) {
+ public TypeBundle visit(Block n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -433,7 +433,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f2 -> Expression()
* f3 -> ";"
*/
- public TypeBundle visit(AssignmentStatement n, ArrayList<String> argu) {
+ public TypeBundle visit(AssignmentStatement n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f0.f0.tokenImage;
MinimalLogger.info(String.format("-> %s",
@@ -442,9 +442,9 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
TypeInstance t = this.symt.getType(id);
if (t == null)
t = this.symt.getTypeAttr(id);
- if (t.getType() == null)
- throw new TypecheckException(String.format("%s glowers at symbol table!",
- n.getClass().getSimpleName()));
+ if (t == null)
+ throw new TypecheckException(String.format("%s was never declared!",
+ id));
TypeBundle tb = new TypeBundle(t.getType(), null);
// Fixme---add subtyping?
@@ -468,7 +468,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f5 -> Expression()
* f6 -> ";"
*/
- public TypeBundle visit(ArrayAssignmentStatement n, ArrayList<String> argu) {
+ public TypeBundle visit(ArrayAssignmentStatement n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f0.f0.tokenImage;
MinimalLogger.info(String.format("-> %s",
@@ -477,7 +477,10 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
TypeInstance t = this.symt.getType(id);
if (t == null)
t = this.symt.getTypeAttr(id);
- if (t == null || t.getType() != TypeEnum.intarray)
+ if (t == null)
+ throw new TypecheckException(String.format("%s was never declared!",
+ id));
+ if (t.getType() != TypeEnum.intarray)
throw new TypecheckException(String.format("%s called on non-array!",
n.getClass().getSimpleName()));
@@ -502,7 +505,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f5 -> "else"
* f6 -> Statement()
*/
- public TypeBundle visit(IfStatement n, ArrayList<String> argu) {
+ public TypeBundle visit(IfStatement n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -527,7 +530,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f3 -> ")"
* f4 -> Statement()
*/
- public TypeBundle visit(WhileStatement n, ArrayList<String> argu) {
+ public TypeBundle visit(WhileStatement n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -551,7 +554,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f3 -> ")"
* f4 -> ";"
*/
- public TypeBundle visit(PrintStatement n, ArrayList<String> argu) {
+ public TypeBundle visit(PrintStatement n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -578,7 +581,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* | MessageSend()
* | PrimaryExpression()
*/
- public TypeBundle visit(Expression n, ArrayList<String> argu) {
+ public TypeBundle visit(Expression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -596,7 +599,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> "&&"
* f2 -> PrimaryExpression()
*/
- public TypeBundle visit(AndExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(AndExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -618,7 +621,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> "<"
* f2 -> PrimaryExpression()
*/
- public TypeBundle visit(CompareExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(CompareExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -641,7 +644,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> "+"
* f2 -> PrimaryExpression()
*/
- public TypeBundle visit(PlusExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(PlusExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -663,7 +666,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> "-"
* f2 -> PrimaryExpression()
*/
- public TypeBundle visit(MinusExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(MinusExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -685,7 +688,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> "*"
* f2 -> PrimaryExpression()
*/
- public TypeBundle visit(TimesExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(TimesExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -708,7 +711,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f2 -> PrimaryExpression()
* f3 -> "]"
*/
- public TypeBundle visit(ArrayLookup n, ArrayList<String> argu) {
+ public TypeBundle visit(ArrayLookup n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -730,7 +733,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> "."
* f2 -> "length"
*/
- public TypeBundle visit(ArrayLength n, ArrayList<String> argu) {
+ public TypeBundle visit(ArrayLength n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -756,7 +759,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f4 -> ( ExpressionList() )?
* f5 -> ")"
*/
- public TypeBundle visit(MessageSend n, ArrayList<String> argu) {
+ public TypeBundle visit(MessageSend n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -769,6 +772,9 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
t = this.symt.getType(((Identifier) n.f0.f0.choice).f0.tokenImage);
if (t == null)
t = this.symt.getTypeAttr(((Identifier) n.f0.f0.choice).f0.tokenImage);
+ if (t == null)
+ throw new TypecheckException(String.format("%s was never declared!",
+ ((Identifier) n.f0.f0.choice).f0.tokenImage));
break;
case 4:
MinimalLogger.info(String.format("Message send found THIS"));
@@ -804,12 +810,24 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
n.getClass().getSimpleName(),
t.getName()));
+ ArrayList<TypeBundle> actual = new ArrayList<TypeBundle>();
+ ArrayList<TypeBundle> expected = new ArrayList<TypeBundle>();
+ n.f4.accept(this, actual);
+ for (TypeInstance e : m.getArguments())
+ expected.add(new TypeBundle(e.getType(), e.getClassInstance()));
+
+ MinimalLogger.info(String.format("Expected arguments: %s\nActual arguments %s",
+ expected.toString(),
+ actual.toString()));
+
+ if (!expected.equals(actual))
+ throw new TypecheckException(String.format("Method %s called with incorrect arguments!",
+ m.getName()));
+
MinimalLogger.info(String.format("The most recently called method is now %s",
m.toString()));
this.recentMethod = m;
- // FIXME Evaluate parameters!
- n.f4.accept(this, argu);
String ret = m.getReturn().getName();
if (ret.equals("intarray"))
_ret = new TypeBundle(TypeEnum.intarray, null);
@@ -830,13 +848,14 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f0 -> Expression()
* f1 -> ( ExpressionRest() )*
*/
- public TypeBundle visit(ExpressionList n, ArrayList<String> argu) {
+ public TypeBundle visit(ExpressionList n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
///////////////////////////////////////////////////////////////
- n.f0.accept(this, argu);
- _ret = n.f1.accept(this, argu);
+ _ret = n.f0.accept(this, argu);
+ argu.add(_ret);
+ n.f1.accept(this, argu);
///////////////////////////////////////////////////////////////
MinimalLogger.info(String.format("<- %s with %s",
n.getClass().getSimpleName(),
@@ -848,12 +867,13 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f0 -> ","
* f1 -> Expression()
*/
- public TypeBundle visit(ExpressionRest n, ArrayList<String> argu) {
+ public TypeBundle visit(ExpressionRest n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
///////////////////////////////////////////////////////////////
_ret = n.f1.accept(this, argu);
+ argu.add(_ret);
///////////////////////////////////////////////////////////////
MinimalLogger.info(String.format("<- %s with %s",
n.getClass().getSimpleName(),
@@ -872,7 +892,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* | NotExpression()
* | BracketExpression()
*/
- public TypeBundle visit(PrimaryExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(PrimaryExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -888,7 +908,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
/**
* f0 -> <INTEGER_LITERAL>
*/
- public TypeBundle visit(IntegerLiteral n, ArrayList<String> argu) {
+ public TypeBundle visit(IntegerLiteral n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -904,7 +924,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
/**
* f0 -> "true"
*/
- public TypeBundle visit(TrueLiteral n, ArrayList<String> argu) {
+ public TypeBundle visit(TrueLiteral n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -920,7 +940,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
/**
* f0 -> "false"
*/
- public TypeBundle visit(FalseLiteral n, ArrayList<String> argu) {
+ public TypeBundle visit(FalseLiteral n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -936,7 +956,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
/**
* f0 -> <IDENTIFIER>
*/
- public TypeBundle visit(Identifier n, ArrayList<String> argu) {
+ public TypeBundle visit(Identifier n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -944,6 +964,9 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
TypeInstance t = this.symt.getType(n.f0.tokenImage);
if (t == null)
t = this.symt.getTypeAttr(n.f0.tokenImage);
+ if (t == null)
+ throw new TypecheckException(String.format("%s was never declared!",
+ n.f0.tokenImage));
_ret = new TypeBundle(t.getType(), t.getClassInstance());
///////////////////////////////////////////////////////////////
MinimalLogger.info(String.format("<- %s with %s",
@@ -955,7 +978,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
/**
* f0 -> "this"
*/
- public TypeBundle visit(ThisExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(ThisExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -975,7 +998,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f3 -> Expression()
* f4 -> "]"
*/
- public TypeBundle visit(ArrayAllocationExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(ArrayAllocationExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -999,7 +1022,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f2 -> "("
* f3 -> ")"
*/
- public TypeBundle visit(AllocationExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(AllocationExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
String id = n.f1.f0.tokenImage;
MinimalLogger.info(String.format("-> %s (%s)",
@@ -1018,7 +1041,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f0 -> "!"
* f1 -> Expression()
*/
- public TypeBundle visit(NotExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(NotExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));
@@ -1036,7 +1059,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<String>> {
* f1 -> Expression()
* f2 -> ")"
*/
- public TypeBundle visit(BracketExpression n, ArrayList<String> argu) {
+ public TypeBundle visit(BracketExpression n, ArrayList<TypeBundle> argu) {
TypeBundle _ret=null;
MinimalLogger.info(String.format("-> %s",
n.getClass().getSimpleName()));