20 lines
545 B
Java
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
|
|
}
|
|
}
|