public class ForHandler extends BlockParentHandler
Handler for for loops.
  • Constructor Details

    • ForHandler

      public ForHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
      Construct an instance of this handler with the given indentation check, abstract syntax tree, and parent handler.
      Parameters:
      indentCheck - the indentation check
      ast - the abstract syntax tree
      parent - the parent handler
  • Method Details

    • checkForParams

      private void checkForParams()
      Check the indentation of the parameters of the 'for' loop.
    • checkIndentation

      public void checkIndentation()
      Description copied from class: AbstractExpressionHandler
      Check the indentation of the expression we are handling.
      Overrides:
      checkIndentation in class BlockParentHandler
    • getForLoopRightParen

      private static DetailAST getForLoopRightParen(DetailAST literalForAst)
      Returns right parenthesis of for-loop statement.
      Parameters:
      literalForAst - literal-for ast node(TokenTypes.LITERAL_FOR)
      Returns:
      right parenthesis of for-loop statement.