v6.5.0
bemhtml.compile()
and bemtree.compile()
should work with arrow functions and function with name and params.
var bemhtml = require('bem-xjst').bemhtml;
var myFunction = function() {
block('page').tag()('body');
};
// myFunction can be in v6.5.0:
// function name() { … }
// function (a, b) { … }
// function name(a, b) { … }
// () => { … }
// (a, b) => { … }
// _ => { … }
var templates = bemhtml.compile(myFunction);