def parse(code, file = '(ruby-lint)', line = 1)
      buffer        = ::Parser::Source::Buffer.new(file, line)
      buffer.source = code
      ast, comments = internal_parser.parse_with_comments(buffer)

      internal_parser.reset

      associated = associate_comments(ast, comments)

      return create_root_node(ast), associated
    end
def parse(code, file = '(ruby-lint)', line = 1)
      buffer        = ::Parser::Source::Buffer.new(file, line)
      buffer.source = code
      ast, comments = internal_parser.parse_with_comments(buffer)

      internal_parser.reset

      associated = associate_comments(ast, comments)

      return create_root_node(ast), associated
    end
Parses a block of Ruby code and returns the AST and a mapping of each AST
 node and their comments (if there are any). This mapping is returned as a
 Hash.

 @param [String] code
 @param [String] file
 @param [Numeric] line
 @return [Array]