You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: parse.go
    path of file: ./repos/comply/vendor/github.com/yosssi/ace
    
    the code of the file until where you have to start completion: package ace

import "strings"

// ParseSource parses the source and returns the result.
func ParseSource(src *source, opts *Options) (*result, error) {
	// Initialize the options.
	opts = InitializeOptions(opts)

	rslt := newResult(nil, nil, nil)

	base, err := parseBytes(src.base.data, rslt, src, opts, src.base)
	if err != nil {
		return nil, err
	}

	inner, err := parseBytes(src.inner.data, rslt, src, opts, src.i
    
func parseBytes(data []byte, rslt *result, src *source, opts *Options, f *File) ([]element, error) {
	var elements []element

	lines := strings.Split(formatLF(string(data)), lf)

	i := 0
	l := len(lines)

	// Ignore the last empty line.
	if l > 0 && lines[l-1] == "" {
		l--
	}

	for i < l {
		// Fetch a line.
		ln := newLine(i+1, lines[i], opts, f)
		i++

		// Ignore the empty line.
		if ln.isEmpty() {
			continue
		}

		if ln.isTopIndent() {
			e, err := newElement(ln, rslt, src, nil, opts)
			if err != nil {
				return nil, err
			}

			// Append child elements to the element.
			if err := appendChildren(e, rslt, lines, &i, l, src, opts, f); err != nil {
				return nil, err
			}

			elements = append(elements, e)
		}
	}

	return elements, nil
}