<commit_before>/**
 * Created with JetBrains WebStorm.
 * User: mschwartz
 * Date: 7/3/13
 * Time: 9:24 AM
 * To change this template use File | Settings | File Templates.
 */

var less = require('..').compile;

console.dir(less);
builtin.process.exit(0);

var source = [
'@base: #f938ab;',
'',
'.box-shadow(@style, @c) when (iscolor(@c)) {',
'    box-shadow:         @style @c;',
'    -webkit-box-shadow: @style @c;',
'    -moz-box-shadow:    @style @c;',
'}',
'.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {',
'.box-shadow(@style, rgba(0, 0, 0, @alpha));',
'}',
'.box {',
'    color: saturate(@base, 5%);',
'    border-color: lighten(@base, 30%);',
'    div { .box-shadow(0 0 5px, 30%) }',
'}'
].join('\n');

//var parser = new less.Parser();
//parser.parse(source, function(e, root) {
//    if (e) {
//        console.dir(e);
//    }
//    else {
//        console.log(root.toCSS());
//    }
//});
//
<commit_msg>fixed example<commit_after>/**
 * Created with JetBrains WebStorm.
 * User: mschwartz
 * Date: 7/3/13
 * Time: 9:24 AM
 * To change this template use File | Settings | File Templates.
 */

var less = require('..');

console.dir(less.Parser);

var source = [
'@base: #f938ab;',
'',
'.box-shadow(@style, @c) when (iscolor(@c)) {',
'    box-shadow:         @style @c;',
'    -webkit-box-shadow: @style @c;',
'    -moz-box-shadow:    @style @c;',
'}',
'.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {',
'.box-shadow(@style, rgba(0, 0, 0, @alpha));',
'}',
'.box {',
'    color: saturate(@base, 5%);',
'    border-color: lighten(@base, 30%);',
'    div { .box-shadow(0 0 5px, 30%) }',
'}'
].join('\n');

console.dir(less.compile(source));


{'fraction_non_alphanumeric': 0.255827854154214, 'fraction_numerical': 0.028093245666467422, 'mean_word_length': 3.1435643564356437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4971949', 'n_tokens_mistral': 699, 'n_tokens_neox': 654, 'n_words': 145}