<commit_before>'use strict';

var util = require('util');
var xregexp = require('./xregexp').XRegExp;

var escape = function(str) {
    return str.replace('$', '\$').replace('{', '\{').replace('}', '\}')
}

function DocsParser(settings) {
    this.editor_settings = settings;
    this.setup_settings();
    this.name_override = null;
}

DocsParser.prototype.init = function(viewSettings) {
    this.viewSettings = viewSettings;
    this.setupSettings();
    this.nameOverride = null;
};

DocsParser.prototype.is_existing_comment = function(line) {
    return ((line.search(/^\s*\*/) >=0) ? true : false);
};

DocsParser.prototype.is_numeric = function(val) {
    if(!isNaN(val))
        return true;

    return false;
};

DocsParser.prototype.set_name_override = function(name) {
    // overrides the description of the function - used instead of parsed description
    this.name_override = name;
};

DocsParser.prototype.get_name_override = function(){
    return this.name_override;
};

DocsParser.prototype.parse = function(line) {
    if(this.editor_settings.simple_mode === true) {
        return null;
    }
    var out = this.parse_function(line);  // (name, args, retval, options)
    if (out) {
        return this.format_function.apply(this, out);
    }
    out = this.parse_var(line);
    if (out) {
        return this.format_var(out.name, out.val);
    }
    return null;<commit_msg>parse_var arguments passing error<commit_after>'use strict';

var util = require('util');
var xregexp = require('./xregexp').XRegExp;

var escape = function(str) {
    return str.replace('$', '\$').replace('{', '\{').replace('}', '\}')
}

function DocsParser(settings) {
    this.editor_settings = settings;
    this.setup_settings();
    this.name_override = null;
}

DocsParser.prototype.init = function(viewSettings) {
    this.viewSettings = viewSettings;
    this.setupSettings();
    this.nameOverride = null;
};

DocsParser.prototype.is_existing_comment = function(line) {
    return ((line.search(/^\s*\*/) >=0) ? true : false);
};

DocsParser.prototype.is_numeric = function(val) {
    if(!isNaN(val))
        return true;

    return false;
};

DocsParser.prototype.set_name_override = function(name) {
    // overrides the description of the function - used instead of parsed description
    this.name_override = name;
};

DocsParser.prototype.get_name_override = function(){
    return this.name_override;
};

DocsParser.prototype.parse = function(line) {
    if(this.editor_settings.simple_mode === true) {
        return null;
    }
    var out = this.parse_function(line);  // (name, args, retval, options)
    if (out) {
        return this.format_function.apply(this, out);
    }
    out = this.parse_var(line);
    if (out) {
        return this.format_var.apply(this, out);
    }
    return null;
{'fraction_non_alphanumeric': 0.1504267425320057, 'fraction_numerical': 0.0007112375533428165, 'mean_word_length': 3.5152487961476724, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7440776', 'n_tokens_mistral': 894, 'n_tokens_neox': 892, 'n_words': 180}