function festTemplate(getVar, getNode, getChildren) {
  return (ast, v) => {
    const { children } = ast;
    return `[${getChildren(children)}]`;
  };
}

function festValue() {
  return (ast) => {
    const { children } = ast;
    return `("" + (${children.map(c => c.toString()).join('')}))`;
  };
}

function festSet(getVar, getNode, getChildren, onVisit) {
  return (ast, v) => {
    v.allExceptChildren(['fest:params']);

    const { attrs: { name }, children } = ast;
    return onVisit(storage => {
      storage.addItem(name, `function (params) {return [${getChildren(children)}];}`);
      return null;
    });
  };
}

function festGet(getVar) {
  return (ast, v) => {
    if (!v.onlyChildren(['fest:params'])) {
      return null;
    }

    const { attrs: { name } } = ast;
    return `${getVar('templates')}['${name}']({})`;
  };
}

module.exports = {
  festTemplate,
  festValue,
  festSet,
  festGet
};

@@ -66,24 +66,147 @@
 st, v) =%3E %7B%0A
+    v.allExceptChildren(%5B%0A      'fest:params',%0A      'fest:param',%0A      'fest:attributes',%0A      'fest:attribute'%0A    %5D);%0A
     const %7B 
@@ -518,32 +518,39 @@
 ExceptChildren(%5B
+%0A      
 'fest:params'%5D);
@@ -546,16 +546,42 @@
 :params'
+,%0A      'fest:param',%0A    
 %5D);%0A%0A   

Add some validation rules