 ids = idsKeys = itemsKeys = extensions = queries = requires = null
 itemsDeclarations = afterItemCode = null
 fileUid = 0
+
+transformByBabel = (body) ->
+    body = "(function(){#{body}})"
+    body = babel.transform(body, presets: ['es2015']).code
+    body = /{([^]*)}/m.exec(body)?[1]
+    body
 
 isAnchor = (obj) ->
     assert obj.type is ATTRIBUTE, "isAnchor: type must be an attribute"

        itemsKeys = []
        code = 'var _c = {};'
        if elem.type is 'code'
            bootstrap += elem.body
            continue
        if typeof stringify[elem.type] isnt 'function'
            console.error "Unexpected block type '#{elem.type}'"

'use strict'

babel = require 'babel-core'
bundle = require './bundle'
parser = require './parser'
bindingParser = require 'src/binding/parser'
