<commit_before>package sexpconv

import (
	"fmt"
	"go/types"
	"lisp"
	"sexp"
)

func zeroValue(typ types.Type) sexp.Form {
	if types.Identical(typ, lisp.Types.Symbol) {
		return sexp.Symbol{Val: "nil"}
	}

	if typ, ok := typ.(*types.Basic); ok {
		switch typ.Kind() {
		case types.String:
			return sexp.String{}
		case types.Bool:
			return sexp.Bool{}

		default:
			info := typ.Info()

			if info&types.IsFloat != 0 {
				return sexp.Float{}
			}
			if info&types.IsInteger != 0 {
				return sexp.Int{}
			}
		}
	}

	panic(fmt.Sprintf("can not provide zero value for %s", typ))
}
<commit_msg>correct map zero value (nil map)<commit_after>package sexpconv

import (
	"fmt"
	"go/types"
	"lisp"
	"sexp"
)

func zeroValue(typ types.Type) sexp.Form {
	if types.Identical(typ, lisp.Types.Symbol) {
		return sexp.Symbol{Val: "nil"}
	}

	if typ, ok := typ.(*types.Basic); ok {
		switch typ.Kind() {
		case types.String:
			return sexp.String{}
		case types.Bool:
			return sexp.Bool{}

		default:
			info := typ.Info()

			if info&types.IsFloat != 0 {
				return sexp.Float{}
			}
			if info&types.IsInteger != 0 {
				return sexp.Int{}
			}
		}
	}

	switch typ := typ.(type) {
	case *types.Basic:
		switch typ.Kind() {
		case types.String:
			return sexp.String{}
		case types.Bool:
			return sexp.Bool{}

		default:
			info := typ.Info()

			if info&types.IsFloat != 0 {
				return sexp.Float{}
			}
			if info&types.IsInteger != 0 {
				return sexp.Int{}
			}
		}

	case *types.Map:
		return sexp.Var{Name: "Go--nil-map"}
	}

	panic(fmt.Sprintf("can not provide zero value for %#v", typ))
}

{'fraction_non_alphanumeric': 0.15733165512901195, 'fraction_numerical': 0.003775959723096287, 'mean_word_length': 2.8686131386861313, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5419118', 'n_tokens_mistral': 714, 'n_tokens_neox': 616, 'n_words': 144}