class SyntaxTree::Parser

def find_token_between(type, left, right)

def find_token_between(type, left, right)
  bounds = left.location.end_char...right.location.start_char
  index =
    tokens.rindex do |token|
      char = token.location.start_char
      break if char < bounds.begin
      token.is_a?(type) && bounds.cover?(char)
    end
  tokens[index] if index
end