<commit_before>/**************************************************************************************
 nexl-engine

 Copyright (c) 2016 <NAME>
 License : Apache 2.0

 nexl expressions processor
 **************************************************************************************/

var esprima = require('esprima');
var path = require('path');
var util = require('util');
var fs = require('fs');
var vm = require('vm');

module.exports = (function () {

	/**
	 * modifiers change the expression's behaviour
	 * modifiers apply at the end of expression
	 * you can specify multiply modifiers for single expression
	 * even you can specify the same modifier many times for single expression ( doesn't work for all modifiers )
	 * for example : ${JS_VARIABLE:10}
	 * which means if JS_VARIABLE is not defined, engine will apply the default value 10 for this expression
	 */
	var MODIFIERS = {
		"DELIMITER": "?",
		"DEF_VALUE": ":",
		"DONT_OMIT_WHOLE_EXPRESSION": "+",
		"OMIT_WHOLE_EXPRESSION": "-",
		"ABORT_ON_UNDEF_VAR": "!",
		"TREAT_AS": "~",
		"REVERSE_RESOLUTION": "<"
	};

	/**
	 * global settings for nexl script evaluation
	 * you can override it by specifying the name of setting as external argument
	 * for example : evalNexlExpression(src, expression, { DEFAULT_DELIMITER: ',' });
	 * which means to change the default delimiter to , character
	 */
	var GLOBAL_SETTINGS = {
		// is used when concatenating arrays
		DEFAULT_DELIMITER: "\n",

		// abort/not abort script execution if it's met an undefined variable
		ABORT_ON_UNDEFINED_VAR: true,

		// who is stronger the external arguments or variables in source script with the same name ?
		ARGS_ARE_OVERRIDING_SRC: true,
<commit_msg>- removed redundant comment;<commit_after>/**************************************************************************************
 nexl-engine

 Copyright (c) 2016 <NAME>
 License : Apache 2.0

 nexl expressions processor
 **************************************************************************************/

var esprima = require('esprima');
var path = require('path');
var util = require('util');
var fs = require('fs');
var vm = require('vm');

module.exports = (function () {
	var MODIFIERS = {
		"DELIMITER": "?",
		"DEF_VALUE": ":",
		"DONT_OMIT_WHOLE_EXPRESSION": "+",
		"OMIT_WHOLE_EXPRESSION": "-",
		"ABORT_ON_UNDEF_VAR": "!",
		"TREAT_AS": "~",
		"REVERSE_RESOLUTION": "<"
	};

	/**
	 * global settings for nexl script evaluation
	 * you can override it by specifying the name of setting as external argument
	 * for example : evalNexlExpression(src, expression, { DEFAULT_DELIMITER: ',' });
	 * which means to change the default delimiter to , character
	 */
	var GLOBAL_SETTINGS = {
		// is used when concatenating arrays
		DEFAULT_DELIMITER: "\n",

		// abort/not abort script execution if it's met an undefined variable
		ABORT_ON_UNDEFINED_VAR: true,

		// who is stronger the external arguments or variables in source script with the same name ?
		ARGS_ARE_OVERRIDING_SRC: true,

{'fraction_non_alphanumeric': 0.21692769076974341, 'fraction_numerical': 0.005331556147950683, 'mean_word_length': 4.7842003853564545, 'pattern_counts': {'":': 16, '<': 7, '<?xml version=': 0, '>': 5, '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': '5494435', 'n_tokens_mistral': 930, 'n_tokens_neox': 830, 'n_words': 278}