<commit_before>package variables

import (
	"github.com/zimmski/tavor/log"
	"github.com/zimmski/tavor/rand"
	"github.com/zimmski/tavor/token"
	"github.com/zimmski/tavor/token/primitives"
)

type Variable struct {
	name  string
	token token.Token
}

func NewVariable(name string, token token.Token) *Variable {
	return &Variable{
		name:  name,
		token: token,
	}
}

func (v *Variable) Name() string {
	return v.name
}

// Token interface methods

func (v *Variable) Clone() token.Token {
	return &Variable{
		name:  v.name,
		token: v.token.Clone(),
	}
}

func (v *Variable) Fuzz(r rand.Rand) {
	v.token.Fuzz(r)
}

func (v *Variable) FuzzAll(r rand.Rand) {
	v.Fuzz(r)
}

func (v *Variable) Parse(pars *token.InternalParser, cur int) (int, []error) {
	panic("TODO implement")
}

func (v *Variable) Permutation(i int) error {
	return v.token.Permutation(i)
}

func (v *Variable) Permutations() int {
	return v.token.Permutations()
}

func (v *Variable) PermutationsAll() int {
	return v.token.PermutationsAll()
}

func (v *Variable) String() string {
	return v.token.String()
}

// ForwardToken interface methods

func (v *Variable) Get() token.Token {
	return nil
}

func (v *Variable) InternalGet() token.Token {<commit_msg>return the token in Variable.Get or else it never gets fuzzed<commit_after>package variables

import (
	"github.com/zimmski/tavor/log"
	"github.com/zimmski/tavor/rand"
	"github.com/zimmski/tavor/token"
	"github.com/zimmski/tavor/token/primitives"
)

type Variable struct {
	name  string
	token token.Token
}

func NewVariable(name string, token token.Token) *Variable {
	return &Variable{
		name:  name,
		token: token,
	}
}

func (v *Variable) Name() string {
	return v.name
}

// Token interface methods

func (v *Variable) Clone() token.Token {
	return &Variable{
		name:  v.name,
		token: v.token.Clone(),
	}
}

func (v *Variable) Fuzz(r rand.Rand) {
	v.token.Fuzz(r)
}

func (v *Variable) FuzzAll(r rand.Rand) {
	v.Fuzz(r)
}

func (v *Variable) Parse(pars *token.InternalParser, cur int) (int, []error) {
	panic("TODO implement")
}

func (v *Variable) Permutation(i int) error {
	return v.token.Permutation(i)
}

func (v *Variable) Permutations() int {
	return v.token.Permutations()
}

func (v *Variable) PermutationsAll() int {
	return v.token.PermutationsAll()
}

func (v *Variable) String() string {
	return v.token.String()
}

// ForwardToken interface methods

func (v *Variable) Get() token.Token {
	return v.token
}

func (v *Variable) InternalGet() token.Token {
{'fraction_non_alphanumeric': 0.1448, 'fraction_numerical': 0.0, 'mean_word_length': 4.1995841995842, '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': '3075505', 'n_tokens_mistral': 970, 'n_tokens_neox': 940, 'n_words': 238}