class SyntaxTree::BodyStmt

def bind(parser, start_char, start_column, end_char, end_column)

Experimental RBS support (using type sampling data from the type_fusion project).

def bind: (SyntaxTree::Parser parser, Integer start_char, Integer start_column, Integer end_char, Integer end_column) -> untyped

This signature was generated using 12 samples from 1 application.

def bind(parser, start_char, start_column, end_char, end_column)
  rescue_clause = self.rescue_clause
  @location =
    Location.new(
      start_line: location.start_line,
      start_char: start_char,
      start_column: start_column,
      end_line: location.end_line,
      end_char: end_char,
      end_column: end_column
    )
  # Here we're going to determine the bounds for the statements
  consequent = rescue_clause || else_clause || ensure_clause
  statements.bind(
    parser,
    start_char,
    start_column,
    consequent ? consequent.location.start_char : end_char,
    consequent ? consequent.location.start_column : end_column
  )
  # Next we're going to determine the rescue clause if there is one
  if rescue_clause
    consequent = else_clause || ensure_clause
    rescue_clause.bind_end(
      consequent ? consequent.location.start_char : end_char,
      consequent ? consequent.location.start_column : end_column
    )
  end
end