class SyntaxTree::Parser

def on_elsif(predicate, statements, consequent)

) -> Elsif
(nil | Elsif | Else) consequent
Statements statements,
untyped predicate,
on_elsif: (
:call-seq:
def on_elsif(predicate, statements, consequent)
  beginning = consume_keyword(:elsif)
  ending = consequent || consume_keyword(:end)
  delimiter =
    find_keyword_between(:then, predicate, statements) ||
      find_token_between(Semicolon, predicate, statements)
  tokens.delete(delimiter) if delimiter
  start_char =
    find_next_statement_start((delimiter || predicate).location.end_char)
  statements.bind(
    self,
    start_char,
    start_char - line_counts[predicate.location.start_line - 1].start,
    ending.location.start_char,
    ending.location.start_column
  )
  Elsif.new(
    predicate: predicate,
    statements: statements,
    consequent: consequent,
    location: beginning.location.to(ending.location)
  )
end