class ForbiddenCallRule extends CobolCheck {

  @Override
  public void visitNode(AstNode callStatementNode) {
    AstNode calledProgramNode = callStatementNode.getFirstChild(getCobolGrammar().literal);
    if (calledProgramNode != null && calledProgramNode.getTokenValue().indexOf("FORBIDDEN") > -1) {
      reportIssue("CALL to this program are forbidden.").on(calledProgramNode);
    }
  }

}