lib/config-generator.js
function(idents, ast) {
        var self = this;

        var result = Object.create(null);
        var found;
        var ident;

        if (ast) {
            jsstana.traverse(ast, function(node) {
                if (found) {
                    found = false;

                    result[ident] = self._extractValue(node);
                }

                for (var i = 0; i < idents.length; i++) {
                    ident = idents[i];

                    if (jsstana.match('(ident ' + ident + ')', node)) {
                        found = true;

                        break;
                    }
                }
            });
        }

        return result;
    }
function(idents, ast) {
        var self = this;

        var result = Object.create(null);
        var found;
        var ident;

        if (ast) {
            jsstana.traverse(ast, function(node) {
                if (found) {
                    found = false;

                    result[ident] = self._extractValue(node);
                }

                for (var i = 0; i < idents.length; i++) {
                    ident = idents[i];

                    if (jsstana.match('(ident ' + ident + ')', node)) {
                        found = true;

                        break;
                    }
                }
            });
        }

        return result;
    }
function ( idents , ast ) { var self = this ; var result = Object . create ( null ) ; var found ; var ident ; if ( ast ) { jsstana . traverse ( ast , function ( node ) { if ( found ) { found = false ; result [ ident ] = self . _extractValue ( node ) ; } for ( var i = 0 ; i < idents . length ; i ++ ) { ident = idents [ i ] ; if ( jsstana . match ( '(ident ' + ident + ')' , node ) ) { found = true ; break ; } } } ) ; } return result ; }
Extract values for some idents from an AST.

@method _extractObjectValues
@param {Array} idents The idents which values should be looked up in the AST
@param {AST} ast The AST to be processed
@return {Object} An object with the extracted values for all found idents
Extract values for some idents from an AST .