visitors.js
function render(expr, traverse, path, state) {
  if (isString(expr)) {
    utils.append(expr, state);
  } else if (Array.isArray(expr)) {
    expr.forEach(function(w) {
      render(w, traverse, path, state);
    });
  } else {
    utils.move(expr.range[0], state);
    traverse(expr, path, state);
    utils.catchup(expr.range[1], state);
  }
}
function render(expr, traverse, path, state) {
  if (isString(expr)) {
    utils.append(expr, state);
  } else if (Array.isArray(expr)) {
    expr.forEach(function(w) {
      render(w, traverse, path, state);
    });
  } else {
    utils.move(expr.range[0], state);
    traverse(expr, path, state);
    utils.catchup(expr.range[1], state);
  }
}
function render ( expr , traverse , path , state ) { if ( isString ( expr ) ) { utils . append ( expr , state ) ; } else if ( Array . isArray ( expr ) ) { expr . forEach ( function ( w ) { render ( w , traverse , path , state ) ; } ) ; } else { utils . move ( expr . range [ 0 ] , state ) ; traverse ( expr , path , state ) ; utils . catchup ( expr . range [ 1 ] , state ) ; } }
Render an expression

This is a helper which can render AST nodes, sting values or arrays which can
contain both of the types.

@param {Node|String|Array} expr Expression to render
@param {Function} traverse
@param {Object} path
@param {Object} state
Render an expression