NichtHaskell/Source/abstractSyntaxTree/Statement/EmptyStatement.java
2024-05-08 12:56:40 +02:00

20 lines
545 B
Java

package abstractSyntaxTree.Statement;
import TypeCheck.TypeCheckResult;
import TypeCheck.AbstractType;
import org.objectweb.asm.MethodVisitor;
public class EmptyStatement extends AbstractType implements IStatement{
@Override
public TypeCheckResult typeCheck() throws Exception {
TypeCheckResult result = new TypeCheckResult();
result.type = "void";
return result;
}
@Override
public void codeGen(MethodVisitor mv) throws Exception {
//An empty statement does not generate any code
}
}