<commit_before>'use strict'


rand = window.fuzz.makeRNG()


generate = {}


generate['Literal'] = do ->
	literals = [
		'2', '3', '5', '7',
		'true', 'false',
		'"a"', '"s"', '"d"',
		'null'
	]

	->
		rand.sample literals


generate['UnaryExpression'] = do ->
	OPERATORS = ['+', '-', '!', 'typeof']

	->
		operand = generate['Expression']()

		operator = rand.sample(OPERATORS)

		"#{operator} #{operand}"


generate['BinaryExpression'] = do ->
	OPERATORS = ['+', '-', '*', '===', '!==']

	->
		left = generate['Expression']()
		right = generate['Expression']()

		operator = rand.sample(OPERATORS)

		"#{left} #{operator} #{right}"


generate['Expression'] = do ->
	GENERATORS = [
		generate['Literal']<commit_msg>Guaranteeing operator order by using parens<commit_after>'use strict'


rand = window.fuzz.makeRNG()


generate = {}


generate['Literal'] = do ->
	literals = [
		'2', '3', '5', '7',
		'true', 'false',
		'"a"', '"s"', '"d"',
		'null'
	]

	->
		rand.sample literals


generate['UnaryExpression'] = do ->
	OPERATORS = ['+', '-', '!', 'typeof']

	->
		operand = generate['Expression']()

		operator = rand.sample(OPERATORS)

		"(#{operator} #{operand})"


generate['BinaryExpression'] = do ->
	OPERATORS = ['+', '-', '*', '===', '!==']

	->
		left = generate['Expression']()
		right = generate['Expression']()

		operator = rand.sample(OPERATORS)

		"(#{left} #{operator} #{right})"


generate['Expression'] = do ->
	GENERATORS = [
		generate['Literal']
{'fraction_non_alphanumeric': 0.252387448840382, 'fraction_numerical': 0.005457025920873124, 'mean_word_length': 3.922818791946309, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '5801597', 'n_tokens_mistral': 583, 'n_tokens_neox': 537, 'n_words': 96}