interface changes and some typecheck for code block. also some minor changes in blockstatement structure
This commit is contained in:
parent
371755f390
commit
4f2599d053
4
.idea/compiler.xml
generated
4
.idea/compiler.xml
generated
@ -6,10 +6,8 @@
|
|||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
<outputRelativeToContentRoot value="true" />
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<module name="NichtHaskell" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
<bytecodeTargetLevel>
|
|
||||||
<module name="NichtHaskell" target="20" />
|
|
||||||
</bytecodeTargetLevel>
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="JAVA_MODULE" version="4">
|
<module version="4">
|
||||||
<component name="AdditionalModuleElements">
|
<component name="AdditionalModuleElements">
|
||||||
<content url="file://$MODULE_DIR$" dumb="true">
|
<content url="file://$MODULE_DIR$" dumb="true">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/Source" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/Source" isTestSource="false" />
|
||||||
|
@ -2,6 +2,7 @@ import abstractSyntaxTree.Class.FieldDecl;
|
|||||||
import abstractSyntaxTree.Class.MethodDecl;
|
import abstractSyntaxTree.Class.MethodDecl;
|
||||||
import abstractSyntaxTree.Class.RefType;
|
import abstractSyntaxTree.Class.RefType;
|
||||||
import abstractSyntaxTree.Program;
|
import abstractSyntaxTree.Program;
|
||||||
|
import abstractSyntaxTree.Statement.BlockStatement;
|
||||||
import gen.DecafLexer;
|
import gen.DecafLexer;
|
||||||
import gen.DecafParser;
|
import gen.DecafParser;
|
||||||
import org.antlr.v4.runtime.CharStream;
|
import org.antlr.v4.runtime.CharStream;
|
||||||
@ -51,8 +52,26 @@ public class Compiler {
|
|||||||
System.out.println(tree);
|
System.out.println(tree);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Program abstractSyntaxTree = new Program(new ArrayList<>());
|
Program abstractSyntaxTree = new Program(new ArrayList<>());
|
||||||
|
List<FieldDecl> fieldDecls = new ArrayList<>();
|
||||||
|
|
||||||
|
FieldDecl fieldDecl = new FieldDecl("int", "i");
|
||||||
|
fieldDecls.add(fieldDecl);
|
||||||
|
|
||||||
|
// FieldDecl fieldDecl2 = new FieldDecl("char", "i");
|
||||||
|
// fieldDecls.add(fieldDecl2);
|
||||||
|
|
||||||
|
List<MethodDecl> methodDecls = new ArrayList<>();
|
||||||
|
|
||||||
|
MethodDecl methodDecl = new MethodDecl("ClassA", "int", "m", new ArrayList<>(), new BlockStatement(new ArrayList<>(), "void"));
|
||||||
|
methodDecls.add(methodDecl);
|
||||||
|
|
||||||
|
// MethodDecl methodDecl2 = new MethodDecl("ClassA", "int", "m", new ArrayList<>(), new ArrayList<>());
|
||||||
|
// methodDecls.add(methodDecl2);
|
||||||
|
|
||||||
|
abstractSyntaxTree.classes.add(new RefType("MyClass", fieldDecls, methodDecls, false));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
abstractSyntaxTree.typeCheck();
|
abstractSyntaxTree.typeCheck();
|
||||||
|
|
||||||
|
@ -2,11 +2,13 @@ package abstractSyntaxTree.Class;
|
|||||||
|
|
||||||
import TypeCheck.TypeCheckResult;
|
import TypeCheck.TypeCheckResult;
|
||||||
import abstractSyntaxTree.Program;
|
import abstractSyntaxTree.Program;
|
||||||
|
import abstractSyntaxTree.Statement.BlockStatement;
|
||||||
import abstractSyntaxTree.Statement.IStatement;
|
import abstractSyntaxTree.Statement.IStatement;
|
||||||
import org.objectweb.asm.ClassWriter;
|
import org.objectweb.asm.ClassWriter;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class MethodDecl implements IClass {
|
public class MethodDecl implements IClass {
|
||||||
|
|
||||||
@ -14,11 +16,11 @@ public class MethodDecl implements IClass {
|
|||||||
public String name;
|
public String name;
|
||||||
public List<String> parameters;
|
public List<String> parameters;
|
||||||
public String returnType;
|
public String returnType;
|
||||||
public List<IStatement> codeBlock;
|
public BlockStatement codeBlock;
|
||||||
|
|
||||||
// save localvars
|
public Map<String, String> localVars;
|
||||||
|
|
||||||
public MethodDecl(String classThatContainsMethod, String returnType, String name, List<String> parameters, List<IStatement> codeBlock){
|
public MethodDecl(String classThatContainsMethod, String returnType, String name, List<String> parameters, BlockStatement codeBlock){
|
||||||
this.classThatContainsMethod = classThatContainsMethod;
|
this.classThatContainsMethod = classThatContainsMethod;
|
||||||
this.returnType = returnType;
|
this.returnType = returnType;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@ -27,8 +29,9 @@ public class MethodDecl implements IClass {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
// write localvars
|
// jede methode als block statement aufrufen und jede neue locale varibale in localvars schreiben
|
||||||
// jede methode als block statement aufrufen
|
|
||||||
|
codeBlock.typeCheck(methodContext, typeContext);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,29 +27,35 @@ public class Program {
|
|||||||
|
|
||||||
|
|
||||||
public TypeCheckResult typeCheck() throws Exception{
|
public TypeCheckResult typeCheck() throws Exception{
|
||||||
|
this.typeContext = new HashMap<>();
|
||||||
|
this.methodContext = new HashMap<>();
|
||||||
|
|
||||||
for(RefType oneClass : classes){
|
for(RefType oneClass : classes){
|
||||||
|
|
||||||
// build type context
|
// build type context
|
||||||
this.typeContext = new HashMap<>();
|
|
||||||
|
|
||||||
HashMap<String, String> classVars = new HashMap<>();
|
HashMap<String, String> classVars = new HashMap<>();
|
||||||
for (FieldDecl fieldDecl: oneClass.fieldDecls){
|
for (FieldDecl fieldDecl: oneClass.fieldDecls){
|
||||||
classVars.put(fieldDecl.type, fieldDecl.identifier);
|
classVars.put(fieldDecl.type, fieldDecl.identifier);
|
||||||
}
|
}
|
||||||
typeContext.put(oneClass.name, classVars);
|
typeContext.put(oneClass.name, classVars);
|
||||||
|
|
||||||
|
// build method context
|
||||||
HashMap<String, List<String>> methodIdentifierAndParameter = new HashMap<>();
|
HashMap<String, List<String>> methodIdentifierAndParameter = new HashMap<>();
|
||||||
HashMap<String, HashMap<String, List<String >>> returnTypeAndMethod = new HashMap<>();
|
HashMap<String, HashMap<String, List<String >>> returnTypeAndMethod = new HashMap<>();
|
||||||
for (MethodDecl methodDecl : oneClass.methodDecls){
|
for (MethodDecl methodDecl : oneClass.methodDecls){
|
||||||
methodIdentifierAndParameter.put(methodDecl.name, methodDecl.parameters);
|
methodIdentifierAndParameter.put(methodDecl.name, methodDecl.parameters);
|
||||||
returnTypeAndMethod.put(methodDecl.returnType, methodIdentifierAndParameter);
|
returnTypeAndMethod.put(methodDecl.returnType, methodIdentifierAndParameter);
|
||||||
}
|
}
|
||||||
this.methodContext = new HashMap<>();
|
|
||||||
methodContext.put(oneClass.name, returnTypeAndMethod);
|
methodContext.put(oneClass.name, returnTypeAndMethod);
|
||||||
|
}
|
||||||
|
|
||||||
|
// typecheck each class
|
||||||
|
TypeCheckResult result = new TypeCheckResult();
|
||||||
|
for(RefType oneClass : classes){
|
||||||
oneClass.typeCheck(methodContext, typeContext);
|
oneClass.typeCheck(methodContext, typeContext);
|
||||||
}
|
}
|
||||||
return null;
|
result.type = "program";
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void codeGen() throws Exception{
|
public void codeGen() throws Exception{
|
||||||
|
@ -11,32 +11,37 @@ public class BlockStatement extends AbstractType implements IStatement{
|
|||||||
|
|
||||||
//We will need a parameter which holds the symbol table
|
//We will need a parameter which holds the symbol table
|
||||||
HashMap<String, String > localVars;
|
HashMap<String, String > localVars;
|
||||||
HashMap<String, String > typeIndentifierTable; // from program
|
String returnType;
|
||||||
List<IStatement> statements;
|
List<IStatement> statements;
|
||||||
// do we need expression, statementexpression
|
// do we need expression, statementexpression
|
||||||
|
|
||||||
public BlockStatement(List<IStatement> statements, HashMap<String, String> localVars, HashMap<String, String> typeIndentifierTable){
|
public BlockStatement(List<IStatement> statements, String returnType){
|
||||||
|
|
||||||
this.statements = statements;
|
this.statements = statements;
|
||||||
|
this.returnType = returnType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TypeCheckResult typeCheck() throws Exception {
|
public TypeCheckResult typeCheck() throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
TypeCheckResult result = new TypeCheckResult();
|
TypeCheckResult result = new TypeCheckResult();
|
||||||
|
|
||||||
if(statements.size() == 0){
|
if(statements.size() == 0){
|
||||||
result.type = "void";
|
result.type = "void";
|
||||||
}
|
}
|
||||||
|
|
||||||
TypeCheckResult blockType = null;
|
TypeCheckResult blockType = new TypeCheckResult();
|
||||||
for (IStatement statement : statements) {
|
for (IStatement statement : statements) {
|
||||||
TypeCheckResult typeOfCurrentStatement = statement.typeCheck();
|
TypeCheckResult typeOfCurrentStatement = statement.typeCheck();
|
||||||
|
|
||||||
if (blockType == null) {
|
if (!typeOfCurrentStatement.equals(this.returnType) && !blockType.equals("void")) {
|
||||||
blockType = typeOfCurrentStatement;
|
throw new IllegalArgumentException("Block returns type that it should not return");
|
||||||
} else if (!typeOfCurrentStatement.equals(blockType) && !blockType.equals("void")) {
|
|
||||||
throw new IllegalArgumentException("different statement types");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// todo check if the block returns the needed return type in every case
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@ import TypeCheck.TypeCheckResult;
|
|||||||
import TypeCheck.AbstractType;
|
import TypeCheck.AbstractType;
|
||||||
import org.objectweb.asm.MethodVisitor;
|
import org.objectweb.asm.MethodVisitor;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class EmptyStatement extends AbstractType implements IStatement{
|
public class EmptyStatement extends AbstractType implements IStatement{
|
||||||
@Override
|
@Override
|
||||||
public TypeCheckResult typeCheck() throws Exception {
|
public TypeCheckResult typeCheck() throws Exception {
|
||||||
@ -12,6 +15,11 @@ public class EmptyStatement extends AbstractType implements IStatement{
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void codeGen(MethodVisitor mv) throws Exception {
|
public void codeGen(MethodVisitor mv) throws Exception {
|
||||||
//An empty statement does not generate any code
|
//An empty statement does not generate any code
|
||||||
|
@ -3,11 +3,16 @@ package abstractSyntaxTree.Statement;
|
|||||||
import TypeCheck.TypeCheckResult;
|
import TypeCheck.TypeCheckResult;
|
||||||
import org.objectweb.asm.MethodVisitor;
|
import org.objectweb.asm.MethodVisitor;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface IStatement {
|
public interface IStatement {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TypeCheckResult typeCheck() throws Exception;
|
TypeCheckResult typeCheck() throws Exception;
|
||||||
|
|
||||||
|
TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception;
|
||||||
|
|
||||||
void codeGen(MethodVisitor mv) throws Exception;
|
void codeGen(MethodVisitor mv) throws Exception;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,9 @@ import TypeCheck.AbstractType;
|
|||||||
import abstractSyntaxTree.Expression.IExpression;
|
import abstractSyntaxTree.Expression.IExpression;
|
||||||
import org.objectweb.asm.*;
|
import org.objectweb.asm.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class IfElseStatement extends AbstractType implements IStatement{
|
public class IfElseStatement extends AbstractType implements IStatement{
|
||||||
IExpression condition;
|
IExpression condition;
|
||||||
IStatement ifStatement;
|
IStatement ifStatement;
|
||||||
@ -37,6 +40,11 @@ public class IfElseStatement extends AbstractType implements IStatement{
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void codeGen(MethodVisitor mv) throws Exception {
|
public void codeGen(MethodVisitor mv) throws Exception {
|
||||||
|
|
||||||
|
@ -5,6 +5,9 @@ import TypeCheck.AbstractType;
|
|||||||
import abstractSyntaxTree.Expression.IExpression;
|
import abstractSyntaxTree.Expression.IExpression;
|
||||||
import org.objectweb.asm.*;
|
import org.objectweb.asm.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class IfStatement extends AbstractType implements IStatement{
|
public class IfStatement extends AbstractType implements IStatement{
|
||||||
IExpression condition;
|
IExpression condition;
|
||||||
|
|
||||||
@ -30,6 +33,11 @@ public class IfStatement extends AbstractType implements IStatement{
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void codeGen(MethodVisitor mv) throws Exception {
|
public void codeGen(MethodVisitor mv) throws Exception {
|
||||||
|
|
||||||
|
@ -5,6 +5,9 @@ import TypeCheck.AbstractType;
|
|||||||
import abstractSyntaxTree.Expression.IExpression;
|
import abstractSyntaxTree.Expression.IExpression;
|
||||||
import org.objectweb.asm.*;
|
import org.objectweb.asm.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ReturnStatement extends AbstractType implements IStatement{
|
public class ReturnStatement extends AbstractType implements IStatement{
|
||||||
IExpression expression;
|
IExpression expression;
|
||||||
|
|
||||||
@ -26,6 +29,11 @@ public class ReturnStatement extends AbstractType implements IStatement{
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//TODO: We do not differentiate between primitive types and reference types
|
//TODO: We do not differentiate between primitive types and reference types
|
||||||
// This is a problem at "BinaryExpression" and here because we need to know the type to return
|
// This is a problem at "BinaryExpression" and here because we need to know the type to return
|
||||||
|
@ -5,6 +5,9 @@ import TypeCheck.AbstractType;
|
|||||||
import abstractSyntaxTree.Expression.IExpression;
|
import abstractSyntaxTree.Expression.IExpression;
|
||||||
import org.objectweb.asm.*;
|
import org.objectweb.asm.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class WhileStatement extends AbstractType implements IStatement {
|
public class WhileStatement extends AbstractType implements IStatement {
|
||||||
IExpression condition;
|
IExpression condition;
|
||||||
IStatement statement;
|
IStatement statement;
|
||||||
@ -30,6 +33,11 @@ public class WhileStatement extends AbstractType implements IStatement {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void codeGen(MethodVisitor mv) throws Exception {
|
public void codeGen(MethodVisitor mv) throws Exception {
|
||||||
Label conditionFalse = new Label();
|
Label conditionFalse = new Label();
|
||||||
|
@ -9,6 +9,8 @@ import abstractSyntaxTree.Expression.VarRefExpression;
|
|||||||
import abstractSyntaxTree.Statement.IStatement;
|
import abstractSyntaxTree.Statement.IStatement;
|
||||||
import org.objectweb.asm.*;
|
import org.objectweb.asm.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class AssignStatementExpression extends AbstractType implements IExpression, IStatement {
|
public class AssignStatementExpression extends AbstractType implements IExpression, IStatement {
|
||||||
@ -32,6 +34,11 @@ public class AssignStatementExpression extends AbstractType implements IExpressi
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void codeGen(MethodVisitor mv) throws Exception {
|
public void codeGen(MethodVisitor mv) throws Exception {
|
||||||
left.codeGen(mv);
|
left.codeGen(mv);
|
||||||
|
@ -10,6 +10,7 @@ import org.objectweb.asm.ClassWriter;
|
|||||||
import org.objectweb.asm.MethodVisitor;
|
import org.objectweb.asm.MethodVisitor;
|
||||||
import org.objectweb.asm.Opcodes;
|
import org.objectweb.asm.Opcodes;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MethodCallStatementExpression extends AbstractType implements IExpression, IStatement {
|
public class MethodCallStatementExpression extends AbstractType implements IExpression, IStatement {
|
||||||
@ -43,6 +44,11 @@ public class MethodCallStatementExpression extends AbstractType implements IExpr
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
//Errors occur due to the change in parameter in the RefType class
|
//Errors occur due to the change in parameter in the RefType class
|
||||||
@Override
|
@Override
|
||||||
public void codeGen(MethodVisitor mv) throws Exception {
|
public void codeGen(MethodVisitor mv) throws Exception {
|
||||||
|
@ -6,12 +6,20 @@ import abstractSyntaxTree.Expression.IExpression;
|
|||||||
import abstractSyntaxTree.Statement.IStatement;
|
import abstractSyntaxTree.Statement.IStatement;
|
||||||
import org.objectweb.asm.MethodVisitor;
|
import org.objectweb.asm.MethodVisitor;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class NewStatementExpression extends AbstractType implements IExpression, IStatement {
|
public class NewStatementExpression extends AbstractType implements IExpression, IStatement {
|
||||||
@Override
|
@Override
|
||||||
public TypeCheckResult typeCheck() throws Exception {
|
public TypeCheckResult typeCheck() throws Exception {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypeCheckResult typeCheck(HashMap<String, HashMap<String, HashMap<String, List<String>>>> methodContext, HashMap<String, HashMap<String, String>> typeContext) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void codeGen(MethodVisitor mv) throws Exception {
|
public void codeGen(MethodVisitor mv) throws Exception {
|
||||||
throw new Exception("CodeGen not implemented for NewStatementExpression");
|
throw new Exception("CodeGen not implemented for NewStatementExpression");
|
||||||
|
Loading…
Reference in New Issue
Block a user