code: function transformSwan(node) {
    // template: data={{}} => data={{{}}}
    var attrs = node.attrs || {};
    if (node.tag === 'template') {
      var data = attrs.data;
      if (!data) return node;
      node.attrs.data = data.replace(MATCH_BRACE, function (g, $1) {
        return '{{{' + $1 + '}}}';
      });
    }
    if (node.tag === 'scroll-view') {
      // {{ scroll }} => {= scroll =}
      ['scroll-top', 'scroll-left', 'scroll-into-view'].forEach(function (attr) {
        var contains = !!attrs[attr];
        if (!contains) return;
        node.attrs[attr] = attrs[attr].replace(MATCH_BRACE, function (g, $1) {
          return '{= ' + $1 + ' =}';
        });
      });
    }
    // https://smartapp.baidu.com/docs/develop/framework/view_for/
    // s-for与s-if不可在同一标签下同时使用。
    var keys = Object.keys(attrs);
    if (keys.includes('s-for') && keys.includes('s-if')) {
      console.warn('s-for\u4E0Es-if\u4E0D\u53EF\u5728\u540C\u4E00\u6807\u7B7E\u4E0B\u540C\u65F6\u4F7F\u7528\u3002\u6B63\u5728\u8F6C\u6362\u6DFB\u52A0block\u4F5C\u4E3As-for\u4F5C\u4E3A\u5FAA\u73AF\u6807\u7B7E');
      var value = attrs['s-for'];
      delete node.attrs['s-for'];
      node.content = [ENTER_STR, cloneNode(node), ENTER_STR];
      node.tag = 'block';
      node.attrs = {
        's-for': value
      };
    }
  
    return node;
  }
docs: swan 转换器
  @param {*} node