lib/grammar.js
function checkEnum(obj, callback) {
    if (obj.type == 'enum') {
        if (!isEnumString(obj.name)) {
            callback(false, 'enum ' + obj.name + ': All letters should be capitalized.');

            return false;
        }

        var enumarr = [];

        for (var i = 0; i < obj.val.length; ++i) {
            if (!checkEnumMember(obj.name, enumarr, obj.val[i], callback)) {
                return false;
            }

            enumarr.push(obj.val[i].val);
        }
    }

    return true;
}
function checkEnum(obj, callback) {
    if (obj.type == 'enum') {
        if (!isEnumString(obj.name)) {
            callback(false, 'enum ' + obj.name + ': All letters should be capitalized.');

            return false;
        }

        var enumarr = [];

        for (var i = 0; i < obj.val.length; ++i) {
            if (!checkEnumMember(obj.name, enumarr, obj.val[i], callback)) {
                return false;
            }

            enumarr.push(obj.val[i].val);
        }
    }

    return true;
}
callback(isok, err)