lib/gen-dot.js
function handle_branch(elem, names) {
		var cond = _dot_inner(elem.cond.fn, false, names);
		var if_true = _dot_inner(elem.if_true.fn, false, names);
		var if_false = _dot_inner(elem.if_false.fn, false, names);
		var terminator = hash_name_get({name : 'branch_end'}, names);
		var builder = [];

		Array.prototype.push.apply(builder, cond[0]);
		Array.prototype.push.apply(builder, if_true[0]);
		Array.prototype.push.apply(builder, if_false[0]);
		builder.push(cond[2]+' [shape=Mdiamond];');
		builder.push(cond[2]+' -> '+if_true[1]+' [label = true];');
		builder.push(cond[2]+' -> '+if_false[1]+' [label = false];');
		builder.push(if_true[2]+' -> '+terminator+';');
		builder.push(if_false[2]+' -> '+terminator+';');
		builder.push(terminator+' [shape=octagon];');
		return [builder, cond[1], terminator];
	}
function handle_branch(elem, names) {
		var cond = _dot_inner(elem.cond.fn, false, names);
		var if_true = _dot_inner(elem.if_true.fn, false, names);
		var if_false = _dot_inner(elem.if_false.fn, false, names);
		var terminator = hash_name_get({name : 'branch_end'}, names);
		var builder = [];

		Array.prototype.push.apply(builder, cond[0]);
		Array.prototype.push.apply(builder, if_true[0]);
		Array.prototype.push.apply(builder, if_false[0]);
		builder.push(cond[2]+' [shape=Mdiamond];');
		builder.push(cond[2]+' -> '+if_true[1]+' [label = true];');
		builder.push(cond[2]+' -> '+if_false[1]+' [label = false];');
		builder.push(if_true[2]+' -> '+terminator+';');
		builder.push(if_false[2]+' -> '+terminator+';');
		builder.push(terminator+' [shape=octagon];');
		return [builder, cond[1], terminator];
	}
function handle_branch ( elem , names ) { var cond = _dot_inner ( elem . cond . fn , false , names ) ; var if_true = _dot_inner ( elem . if_true . fn , false , names ) ; var if_false = _dot_inner ( elem . if_false . fn , false , names ) ; var terminator = hash_name_get ( { name : 'branch_end' } , names ) ; var builder = [ ] ; Array . prototype . push . apply ( builder , cond [ 0 ] ) ; Array . prototype . push . apply ( builder , if_true [ 0 ] ) ; Array . prototype . push . apply ( builder , if_false [ 0 ] ) ; builder . push ( cond [ 2 ] + ' [shape=Mdiamond];' ) ; builder . push ( cond [ 2 ] + ' -> ' + if_true [ 1 ] + ' [label = true];' ) ; builder . push ( cond [ 2 ] + ' -> ' + if_false [ 1 ] + ' [label = false];' ) ; builder . push ( if_true [ 2 ] + ' -> ' + terminator + ';' ) ; builder . push ( if_false [ 2 ] + ' -> ' + terminator + ';' ) ; builder . push ( terminator + ' [shape=octagon];' ) ; return [ builder , cond [ 1 ] , terminator ] ; }
Handle a branch-type chain, which includes fancy decision labels and
formatting
@param elem The branch element
@param names The hash table of names we've seen
@return Standard triple of [strings, first element, last element]
Handle a branch - type chain which includes fancy decision labels and formatting