use of net.sourceforge.pmd.lang.dfa.Structure in project pmd by pmd.
the class StatementAndBraceFinder method visit.
@Override
public Object visit(ASTEmbeddedSqlStatement node, Object data) {
if (!(data instanceof Structure)) {
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("immediate return ASTEmbeddedSqlStatement: line " + node.getBeginLine() + ", column " + node.getBeginColumn());
}
return data;
}
Structure dataFlow = (Structure) data;
dataFlow.createNewNode(node);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("createNewNode ASTEmbeddedSqlStatement: line " + node.getBeginLine() + ", column " + node.getBeginColumn());
}
return super.visit(node, data);
}
use of net.sourceforge.pmd.lang.dfa.Structure in project pmd by pmd.
the class StatementAndBraceFinder method visit.
@Override
public Object visit(ASTOpenStatement node, Object data) {
if (!(data instanceof Structure)) {
return data;
}
Structure dataFlow = (Structure) data;
dataFlow.createNewNode(node);
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("createNewNode ASTOpenStatement: line " + node.getBeginLine() + ", column " + node.getBeginColumn());
}
return super.visit(node, data);
}
use of net.sourceforge.pmd.lang.dfa.Structure in project pmd by pmd.
the class StatementAndBraceFinder method visit.
/**
* Treat a PLSQL GOTO like a Java "continue"
*
* @param node
* @param data
* @return
*/
@Override
public Object visit(ASTGotoStatement node, Object data) {
if (!(data instanceof Structure)) {
return data;
}
Structure dataFlow = (Structure) data;
dataFlow.createNewNode(node);
dataFlow.pushOnStack(NodeType.CONTINUE_STATEMENT, dataFlow.getLast());
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("pushOnStack (ASTGotoStatement) CONTINUE_STATEMENT (GOTO): line " + node.getBeginLine() + ", column " + node.getBeginColumn());
}
return super.visit(node, data);
}
use of net.sourceforge.pmd.lang.dfa.Structure in project pmd by pmd.
the class StatementAndBraceFinder method visit.
@Override
public Object visit(ASTReturnStatement node, Object data) {
if (!(data instanceof Structure)) {
return data;
}
Structure dataFlow = (Structure) data;
dataFlow.createNewNode(node);
dataFlow.pushOnStack(NodeType.RETURN_STATEMENT, dataFlow.getLast());
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("pushOnStack RETURN_STATEMENT: line " + node.getBeginLine() + ", column " + node.getBeginColumn());
}
return super.visit(node, data);
}
use of net.sourceforge.pmd.lang.dfa.Structure in project pmd by pmd.
the class StatementAndBraceFinder method visit.
/**
* Treat a PLSQL EXIT like a Java "break"
*
* @param node
* @param data
* @return
*/
@Override
public Object visit(ASTExitStatement node, Object data) {
if (!(data instanceof Structure)) {
return data;
}
Structure dataFlow = (Structure) data;
dataFlow.createNewNode(node);
dataFlow.pushOnStack(NodeType.BREAK_STATEMENT, dataFlow.getLast());
if (LOGGER.isLoggable(Level.FINEST)) {
LOGGER.finest("pushOnStack (ASTExitStatement) BREAK_STATEMENT: line " + node.getBeginLine() + ", column " + node.getBeginColumn());
}
return super.visit(node, data);
}
Aggregations