def text_between_token_positions(text, left, right, inclusive = :none)
      result = ""
      lines = text.lines.to_a
      left.line.upto(right.line) do |cur_line|
        line = lines[cur_line - 1]
        result << left.body if cur_line == left.line && (inclusive == :both || inclusive == :left)
        left_bound = cur_line == left.line ? left.col + left.body.size : 0
        right_bound = cur_line == right.line ? right.col - 1 : -1
        result << line[left_bound..right_bound]
        result << right.body if cur_line == right.line && (inclusive == :both || inclusive == :right)
      end
      result
    end
def text_between_token_positions(text, left, right, inclusive = :none)
      result = ""
      lines = text.lines.to_a
      left.line.upto(right.line) do |cur_line|
        line = lines[cur_line - 1]
        result << left.body if cur_line == left.line && (inclusive == :both || inclusive == :left)
        left_bound = cur_line == left.line ? left.col + left.body.size : 0
        right_bound = cur_line == right.line ? right.col - 1 : -1
        result << line[left_bound..right_bound]
        result << right.body if cur_line == right.line && (inclusive == :both || inclusive == :right)
      end
      result
    end
Returns the text between two token positions. The token positions are
 in [line, column] format. The body, left, and right tokens must be provided,
 and optionally, you can override the inclusiveness of the text-between operation.
 It defaults to :none, for including neither the left nor right tokens in the
 result. You can pass :none, :left, :right, or :both.

 @param [String] body (self.body) The first parameter is optional: the text
   to search. This defaults to the full text.
 @param [Token] left the left token to get the text between
 @param [Token] right the right token to get the text between
 @param [Symbol] inclusive should the :left, :right, :both, or :none tokens
    be included in the resulting text?
 @return the text between the two tokens within the text. This is necessary
    because the lexer provides [line, column] coordinates which is quite
    unfortunate.