<commit_before>'use strict';

var Node = require('./Node');

class ObjectExpression extends Node {
    constructor(def) {
        super('ObjectExpression');
        this.properties = def.properties;
    }

    generateCode(codegen) {
        var properties = this.properties;

        if (!properties || !properties.length) {
            this.write('{}');
            return;
        }

        codegen.incIndent();
        codegen.write('{\n');
        codegen.incIndent();

        properties.forEach((prop, i) => {
            codegen.writeLineIndent();
            codegen.generateCode(prop);

            if (i < properties.length - 1) {
                codegen.write(',\n');
            } else {
                codegen.write('\n');
            }
        });

        codegen.decIndent();
        codegen.writeLineIndent();<commit_msg>Marko v3: Fix for empty ObjectExpression<commit_after>'use strict';

var Node = require('./Node');

class ObjectExpression extends Node {
    constructor(def) {
        super('ObjectExpression');
        this.properties = def.properties;
    }

    generateCode(codegen) {
        var properties = this.properties;

        if (!properties || !properties.length) {
            codegen.write('{}');
            return;
        }

        codegen.incIndent();
        codegen.write('{\n');
        codegen.incIndent();

        properties.forEach((prop, i) => {
            codegen.writeLineIndent();
            codegen.generateCode(prop);

            if (i < properties.length - 1) {
                codegen.write(',\n');
            } else {
                codegen.write('\n');
            }
        });

        codegen.decIndent();
        codegen.writeLineIndent();
{'fraction_non_alphanumeric': 0.13960280373831777, 'fraction_numerical': 0.0017523364485981308, 'mean_word_length': 1.7364217252396166, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3845495', 'n_tokens_mistral': 473, 'n_tokens_neox': 456, 'n_words': 80}