Deleted TODOs which are done
This commit is contained in:
parent
b787b333fb
commit
d1da1c6eee
@ -49,7 +49,6 @@ public class FieldDecl extends AbstractType implements Node {
|
||||
}
|
||||
|
||||
public void codeGen(ClassWriter cw) {
|
||||
//TODO: Do we have fields with initial values? --> No dont think so --> assign
|
||||
FieldVisitor fv = cw.visitField(Opcodes.ACC_PUBLIC, identifier, getFieldDescriptor(), null, null);
|
||||
fv.visitEnd();
|
||||
}
|
||||
|
@ -75,7 +75,6 @@ public class MethodDecl implements Node {
|
||||
mv.visitVarInsn(Opcodes.ALOAD, 0);
|
||||
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
|
||||
|
||||
//TODO: Initialize the fields of the class
|
||||
HashMap<String, String> classFields = typeContext.get(classThatContainsMethod);
|
||||
|
||||
for (Map.Entry<String, String> entry : classFields.entrySet()) {
|
||||
|
@ -52,8 +52,7 @@ public class Program implements Node {
|
||||
}
|
||||
methodContext.put(oneClass.name, identifierAndMethod);
|
||||
}
|
||||
//TODO: uncomment this code
|
||||
/*
|
||||
|
||||
int mainCounter = 0;
|
||||
// check if main exists
|
||||
for(RefType oneClass : classes){
|
||||
@ -62,7 +61,6 @@ public class Program implements Node {
|
||||
}
|
||||
if(mainCounter != 1)
|
||||
throw new TypeCheckException("There is not 1 Main method.");
|
||||
*/
|
||||
|
||||
// typecheck each class
|
||||
TypeCheckResult result = new TypeCheckResult();
|
||||
|
Loading…
Reference in New Issue
Block a user