2024-04-25 11:27:38 +00:00
|
|
|
package abstractSyntaxTree.Statement;
|
|
|
|
|
2024-05-02 11:12:39 +00:00
|
|
|
import TypeCheck.TypeCheckResult;
|
|
|
|
import TypeCheck.AbstractType;
|
2024-05-07 11:50:51 +00:00
|
|
|
import org.objectweb.asm.MethodVisitor;
|
2024-05-02 11:12:39 +00:00
|
|
|
|
|
|
|
public class EmptyStatement extends AbstractType implements IStatement{
|
|
|
|
@Override
|
|
|
|
public TypeCheckResult typeCheck() throws Exception {
|
2024-05-02 12:31:37 +00:00
|
|
|
TypeCheckResult result = new TypeCheckResult();
|
|
|
|
result.type = "void";
|
|
|
|
return result;
|
2024-05-02 11:12:39 +00:00
|
|
|
}
|
2024-05-07 11:50:51 +00:00
|
|
|
|
|
|
|
@Override
|
2024-05-08 10:56:40 +00:00
|
|
|
public void codeGen(MethodVisitor mv) throws Exception {
|
2024-05-07 11:50:51 +00:00
|
|
|
//An empty statement does not generate any code
|
|
|
|
}
|
2024-04-25 11:27:38 +00:00
|
|
|
}
|