lib/compiler/blocks.js
function blocks(ast) {
  const body = [ast];
  // start with body of function
  const nodes = getBlocks(ast.body.body);
  if (nodes.length) {
    const { props } = nodes.reduce(everyBlock, { keysUsed: [], props: [] });
    body.push(t.expressionStatement(t.assignmentExpression(
      '=',
      c.BLOCKS,
      t.objectExpression(props)
    )));
  }

  return body;
}
function blocks(ast) {
  const body = [ast];
  // start with body of function
  const nodes = getBlocks(ast.body.body);
  if (nodes.length) {
    const { props } = nodes.reduce(everyBlock, { keysUsed: [], props: [] });
    body.push(t.expressionStatement(t.assignmentExpression(
      '=',
      c.BLOCKS,
      t.objectExpression(props)
    )));
  }

  return body;
}
function blocks ( ast ) { const body = [ ast ] ; // start with body of function const nodes = getBlocks ( ast . body . body ) ; if ( nodes . length ) { const { props } = nodes . reduce ( everyBlock , { keysUsed : [ ] , props : [ ] } ) ; body . push ( t . expressionStatement ( t . assignmentExpression ( '=' , c . BLOCKS , t . objectExpression ( props ) ) ) ) ; } return body ; }
Pull top-level blocks out of ast and expose them at `compiled.blocks`
@param {object} ast
@returns {object}
Pull top - level blocks out of ast and expose them at compiled . blocks