All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.walkmod.checkstyle.treewalkers.EmptyStatement Maven / Gradle / Ivy

package org.walkmod.checkstyle.treewalkers;

import org.walkmod.checkstyle.visitors.AbstractCheckStyleRule;
import org.walkmod.javalang.ast.Node;
import org.walkmod.javalang.ast.stmt.BlockStmt;
import org.walkmod.javalang.ast.stmt.EmptyStmt;

public class EmptyStatement extends AbstractCheckStyleRule {

   @Override
   public void visit(EmptyStmt n, A ctx) {
      Node parent = n.getParentNode();
      if (parent instanceof BlockStmt) {
         n.remove();
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy