<commit_before>/*!
 * Snakeskin
 * https://github.com/SnakeskinTpl/Snakeskin
 *
 * Released under the MIT license
 * https://github.com/SnakeskinTpl/Snakeskin/blob/master/LICENSE
 */

import Snakeskin from '../core';

Snakeskin.addDirective(
	'__setError__',

	{

	},

	function (command) {
		this.error(this.pasteDangerBlocks(command));
	}

);

Snakeskin.addDirective(
	'__appendLine__',

	{
		deferInit: true,
		group: 'ignore',
		placement: Snakeskin.placement('template')
	},

	function (command) {
		this
			.startInlineDir('cdata')
			.isSimpleOutput();

		const
			val = parseInt(command, 10);

		this.info.line += val;
		if (!this.proto) {
			for (let i = 0; i < val; i++) {
				this.lines[this.info.line + i] = '';
			}
		}
	}

);

Snakeskin.addDirective(
	'__setLine__',

	{
		group: 'ignore'
	},

	function (command) {
		if (!this.freezeLine) {
			this.info.line = parseInt(command, 10);
		}
	}

);

Snakeskin.addDirective(
	'__cutLine__',

	{
		group: 'ignore'
	},

	function () {
		if (!this.freezeLine) {
			this.lines.pop();
			this.info.line--;
		}
	}

);

Snakeskin.addDirective(
	'__sp__',

	{
		group: 'ignore',
		text: true
	}
);

Snakeskin.addDirective(
	'__switchLine__',

	{
		deferInit: true,
		group: 'ignore'
	},

	function (command) {
		this.startDir(null, {
			line: this.info.line
		});

		if (!this.freezeLine) {
			this.info.line = parseInt(command, 10);
		}
	},

	function () {
		if (!this.freezeLine) {
			const
				length = this.info.line = this.structure.params.line;

			for (let i = this.lines.length; i < length; i++) {
				this.lines.push('');
			}
		}<commit_msg>Added 'use strict'; and some fixes<commit_after>'use strict';

/*!
 * Snakeskin
 * https://github.com/SnakeskinTpl/Snakeskin
 *
 * Released under the MIT license
 * https://github.com/SnakeskinTpl/Snakeskin/blob/master/LICENSE
 */

import Snakeskin from '../core';

Snakeskin.addDirective(
	'__setError__',

	{

	},

	function (command) {
		this.error(this.pasteDangerBlocks(command));
	}

);

Snakeskin.addDirective(
	'__appendLine__',

	{
		deferInit: true,
		group: 'ignore',
		placement: Snakeskin.placement('template')
	},

	function (command) {
		this
			.startInlineDir('cdata')
			.isSimpleOutput();

		const val = parseInt(command, 10);
		this.info.line += val;

		if (this.proto) {
			return;
		}

		for (let i = 0; i < val; i++) {
			this.lines[this.info.line + i] = '';
		}
	}

);

Snakeskin.addDirective(
	'__setLine__',

	{
		group: 'ignore'
	},

	function (command) {
		if (this.freezeLine) {
			return;
		}

		this.info.line = parseInt(command, 10);
	}

);

Snakeskin.addDirective(
	'__cutLine__',

	{
		group: 'ignore'
	},

	function () {
		if (this.freezeLine) {
			return;
		}

		this.lines.pop();
		this.info.line--;
	}

);

Snakeskin.addDirective(
	'__sp__',

	{
		group: 'ignore',
		text: true
	}
);

Snakeskin.addDirective(
	'__switchLine__',

	{
		deferInit: true,
		group: 'ignore'
	},

	function (command) {
		this.startDir(null, {
			line: this.info.line
		});

		if (this.freezeLine) {
			return;
		}

		this.info.line = parseInt(command, 10);
	},

	function () {
		if (this.freezeLine) {
			return;
		}

		const
			length = this.info.line = this.structure.params.line;

		for (let i = this.lines.length; i < length; i++) {
			this.lines.push('');
		}
{'fraction_non_alphanumeric': 0.1724558196221816, 'fraction_numerical': 0.0042656916514320535, 'mean_word_length': 3.06815365551425, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '6312519', 'n_tokens_mistral': 1467, 'n_tokens_neox': 1301, 'n_words': 221}