<commit_before>
    // Match any single/double quoted string
var REGEX_BEGINS_WITH_STRING = new RegExp('^(?:"(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\']*(?:\'\'[^\']*)*)\')', '');

var REGEX_ENDS_WITH_BEFORE_CALL_CHAR = /[a-zA-Z0-9_\]\)]\s*$/;
var REGEX_ENDS_WITH_BEFORE_SIGNATURE_CHAR = /[a-zA-Z0-9_\>]\s*$/;
var REGEX_ENDS_WITH_KEY = /([a-zA-Z0-9_]+)\s*\:$/;
var REGEX_ENDS_WITH_ALPHANUMERIC = /([a-zA-Z0-9_]+)$/;
var REGEX_BEGINS_WITH_KEY = /^([a-zA-Z0-9_]+)\s*\:/;
var REGEX_PACKAGE = /^package\s*([a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*)/;
var REGEX_ENDS_WITH_FUNCTION_DEF = /[^a-zA-Z0-9_]function\s+[a-zA-Z0-9_]+$/;
var REGEX_IMPORT = /import\s*([a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*)(?:\s+(?:in|as)\s+([a-zA-Z0-9_]+))?/g;

module.exports = {<commit_msg>parsing; Better function definition regex that should handle anonymous functions and generics<commit_after>
    // Match any single/double quoted string
var REGEX_BEGINS_WITH_STRING = new RegExp('^(?:"(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\']*(?:\'\'[^\']*)*)\')', '');

var REGEX_ENDS_WITH_BEFORE_CALL_CHAR = /[a-zA-Z0-9_\]\)]\s*$/;
var REGEX_ENDS_WITH_BEFORE_SIGNATURE_CHAR = /[a-zA-Z0-9_\>]\s*$/;
var REGEX_ENDS_WITH_KEY = /([a-zA-Z0-9_]+)\s*\:$/;
var REGEX_ENDS_WITH_ALPHANUMERIC = /([a-zA-Z0-9_]+)$/;
var REGEX_BEGINS_WITH_KEY = /^([a-zA-Z0-9_]+)\s*\:/;
var REGEX_PACKAGE = /^package\s*([a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*)/;
var REGEX_ENDS_WITH_FUNCTION_DEF = /[^a-zA-Z0-9_]function(?:\s+[a-zA-Z0-9_]+)?(?:\<[a-zA-Z0-9_\<\>, ]+\>)?$/;
var REGEX_IMPORT = /import\s*([a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*)(?:\s+(?:in|as)\s+([a-zA-Z0-9_]+))?/g;

module.exports = {
{'fraction_non_alphanumeric': 0.33643699565487273, 'fraction_numerical': 0.031036623215394164, 'mean_word_length': 4.166666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3911930', 'n_tokens_mistral': 871, 'n_tokens_neox': 824, 'n_words': 81}