Interface AstVisitor

All Known Subinterfaces:
AstAndTokenVisitor
All Known Implementing Classes:
CobolAstVisitor, CobolCheck

public interface AstVisitor
  • Method Summary

    Modifier and Type
    Method
    Description
    The AST node types that this check must be registered for.
    void
    Called once a computation unit tree has been fully visited.
    void
    Called once an AST node has been fully visited.
    void
    Called before starting visiting a computation unit tree.
    void
    Called to process an AST node whose type has been registered to be visited.
  • Method Details

    • getAstNodeTypesToVisit

      List<AstNodeType> getAstNodeTypesToVisit()
      The AST node types that this check must be registered for.
      Returns:
      the AST node types this must be registered for.
    • visitFile

      void visitFile(@Nullable AstNode ast)
      Called before starting visiting a computation unit tree. Ideal place to initialize information that is to be collected while processing the tree.
      Parameters:
      ast - the root of the tree, or null if no tree
    • leaveFile

      void leaveFile(@Nullable AstNode ast)
      Called once a computation unit tree has been fully visited. Ideal place to report on information collected while processing a tree.
      Parameters:
      ast - the root of the tree, or null if no tree
    • visitNode

      void visitNode(AstNode ast)
      Called to process an AST node whose type has been registered to be visited.
      Parameters:
      ast - the AST node to process
    • leaveNode

      void leaveNode(AstNode ast)
      Called once an AST node has been fully visited.
      Parameters:
      ast - the AST node which has been visited