class YARD::Parser::Ruby::AstNode

def reset_line_info

Returns:
  • (void) -
def reset_line_info
  if size == 0
    self.line_range = @fallback_line
    self.source_range = @fallback_source
  elsif !children.empty?
    f = children.first
    l = children.last
    self.line_range = Range.new(f.line_range.first, l.line_range.last)
    self.source_range = Range.new(f.source_range.first, l.source_range.last)
  elsif @fallback_line || @fallback_source
    self.line_range = @fallback_line
    self.source_range = @fallback_source
  else
    self.line_range = 0...0
    self.source_range = 0...0
  end
end