lib/gen-dot.js
function _dot_inner(elem, make_digraph, names) {
		var builder = [];
		var name = hash_name_get(elem, names);

		// Only push graphs/clusters for chains
		if (elem instanceof fl.ChainBase) {
			if (make_digraph)
				builder.push('digraph '+name+' {');
			else
				builder.push('subgraph cluster_'+name+' {');
			builder.push('label = '+name+';');

			// Get the graph content for this chain, then add it
			var nest = get_chain_content(elem, names);
			Array.prototype.push.apply(builder, nest[0]);
			var chain_entry = nest[1];
			var chain_exit = nest[2];

			// Also insert special header node to indicate entry
			if (make_digraph) {
				var header = hash_name_get({name : 'Global Start'}, names);
				builder.push(header+' [shape=doublecircle];');
				builder.push(header+' -> '+chain_entry+';');
				builder.push(chain_exit+' [shape=doublecircle];');
			}

			builder.push('}');
			return [builder, chain_entry, chain_exit];
		}
		else {
			// Just a normal function, return it in our results
			return [[], name, name];
		}

	}
function _dot_inner(elem, make_digraph, names) {
		var builder = [];
		var name = hash_name_get(elem, names);

		// Only push graphs/clusters for chains
		if (elem instanceof fl.ChainBase) {
			if (make_digraph)
				builder.push('digraph '+name+' {');
			else
				builder.push('subgraph cluster_'+name+' {');
			builder.push('label = '+name+';');

			// Get the graph content for this chain, then add it
			var nest = get_chain_content(elem, names);
			Array.prototype.push.apply(builder, nest[0]);
			var chain_entry = nest[1];
			var chain_exit = nest[2];

			// Also insert special header node to indicate entry
			if (make_digraph) {
				var header = hash_name_get({name : 'Global Start'}, names);
				builder.push(header+' [shape=doublecircle];');
				builder.push(header+' -> '+chain_entry+';');
				builder.push(chain_exit+' [shape=doublecircle];');
			}

			builder.push('}');
			return [builder, chain_entry, chain_exit];
		}
		else {
			// Just a normal function, return it in our results
			return [[], name, name];
		}

	}
function _dot_inner ( elem , make_digraph , names ) { var builder = [ ] ; var name = hash_name_get ( elem , names ) ; // Only push graphs/clusters for chains if ( elem instanceof fl . ChainBase ) { if ( make_digraph ) builder . push ( 'digraph ' + name + ' {' ) ; else builder . push ( 'subgraph cluster_' + name + ' {' ) ; builder . push ( 'label = ' + name + ';' ) ; // Get the graph content for this chain, then add it var nest = get_chain_content ( elem , names ) ; Array . prototype . push . apply ( builder , nest [ 0 ] ) ; var chain_entry = nest [ 1 ] ; var chain_exit = nest [ 2 ] ; // Also insert special header node to indicate entry if ( make_digraph ) { var header = hash_name_get ( { name : 'Global Start' } , names ) ; builder . push ( header + ' [shape=doublecircle];' ) ; builder . push ( header + ' -> ' + chain_entry + ';' ) ; builder . push ( chain_exit + ' [shape=doublecircle];' ) ; } builder . push ( '}' ) ; return [ builder , chain_entry , chain_exit ] ; } else { // Just a normal function, return it in our results return [ [ ] , name , name ] ; } }
Inner worker function used to build the actual DOT description
@param elem The element to describe
@param make_digraph Should this node be instantiated as a digraph or subgraph cluster
@param names The hash table of functions and their names that have been seen
@return Standard triple of [strings, first element, last element]
Inner worker function used to build the actual DOT description