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/podman/vendor/github.com/BurntSushi/toml
    
    the code of the file until where you have to start completion: package toml

import (
	"fmt"
	"os"
	"strconv"
	"strings"
	"time"
	"unicode/utf8"

	"github.com/BurntSushi/toml/internal"
)

type parser struct {
	lx         *lexer
	context    Key      // Full key for the current hash in scope.
	currentKey string   // Base key name for everything except hashes.
	pos        Position // Current position in the TOML file.
	tomlNext   bool

	ordered []Key // List of keys in the order that they appear in the TOML data.

	keyInfo   map[string]keyInfo     // Map keyname → info about the TOML key.
	mapping   map[string]interface{} // Map keyname → key value.
	implicits map[string]struct{}    // Record implicit keys (e.g. "key.group.names").
}

type keyInfo struct {
	pos      Position
	tomlType tomlType
}

func parse(data string) (p *parser, err error) {
	_, tomlNext := os.LookupEnv("BURNTSUSHI_TOML_110")

	defer func() {
		if r := recover(); r != nil {
			if pErr, ok := r.(ParseError); ok {
				pErr.input = data
				err = pErr
				return
			}
			panic(r)
		}
	}()

	// Read over BOM; do this here as the lexer calls utf8.DecodeRuneInString()
	// which mangles stuff. UTF-16 BOM isn't strictly valid, but some tools add
	// it anyway.
	if strings.HasPrefix(data, "\xff\xfe") || strings.HasPrefix(data, "\xfe\xff") { // UTF-16
		data = data[2:]
	} else if strings.HasPrefix(data, "\xef\xbb\xbf") { // UTF-8
		data = data[3:]
	}

	// Examine first few bytes for NULL bytes; this probably means it's a UTF-16
	// file (second by
    
func parse(data string) (p *parser, err error) {
	_, tomlNext := os.LookupEnv("BURNTSUSHI_TOML_110")

	defer func() {
		if r := recover(); r != nil {
			if pErr, ok := r.(ParseError); ok {
				pErr.input = data
				err = pErr
				return
			}
			panic(r)
		}
	}()

	// Read over BOM; do this here as the lexer calls utf8.DecodeRuneInString()
	// which mangles stuff. UTF-16 BOM isn't strictly valid, but some tools add
	// it anyway.
	if strings.HasPrefix(data, "\xff\xfe") || strings.HasPrefix(data, "\xfe\xff") { // UTF-16
		data = data[2:]
	} else if strings.HasPrefix(data, "\xef\xbb\xbf") { // UTF-8
		data = data[3:]
	}

	// Examine first few bytes for NULL bytes; this probably means it's a UTF-16
	// file (second byte in surrogate pair being NULL). Again, do this here to
	// avoid having to deal with UTF-8/16 stuff in the lexer.
	ex := 6
	if len(data) < 6 {
		ex = len(data)
	}
	if i := strings.IndexRune(data[:ex], 0); i > -1 {
		return nil, ParseError{
			Message:  "files cannot contain NULL bytes; probably using UTF-16; TOML files must be UTF-8",
			Position: Position{Line: 1, Start: i, Len: 1},
			Line:     1,
			input:    data,
		}
	}

	p = &parser{
		keyInfo:   make(map[string]keyInfo),
		mapping:   make(map[string]interface{}),
		lx:        lex(data, tomlNext),
		ordered:   make([]Key, 0),
		implicits: make(map[string]struct{}),
		tomlNext:  tomlNext,
	}
	for {
		item := p.next()
		if item.typ == itemEOF {
			break
		}
		p.topLevel(item)
	}

	return p, nil
}