docs: function querySelector(selector) {
      init();
      if (!selector) {
        return tokens;
      }
      var match = selector.match(
        /^\s*([\w_-]*)((\s*\[[\w_-]+\s*=\s*("([^\\"]*(\\.)*)*"|'([^\\']*(\\.)*)*'|[^\[\]]*)\])*)\s*(\*?)$/
      );
      if (!match) {
        console.warn(colors.blue('Invalid selector expressions %j.'), selector);
        return;
      }
      var tag = match[1];
      var attributes = [];
      var all = match[9] === '*';
      match[2].replace(/\s*\[([\w_-]+)\s*=\s*("([^\\"]*(\\.)*)*"|'([^\\']*(\\.)*)*'|[^\[\]]*)\]/g,
        function (match, name, value) {
          if (/^['"]/.test(value)) {
            /*jslint evil: true */
            value = new Function('return (' + value + ');')();
          }
          attributes.push({
            name: name,
            value: value
          });
        }
      );
      function check(node) {
        if (!node || !node.attrs) {
          return;
        }
        var flag;
        if (!tag || node.tag === tag) {
          flag = true;
          attributes.every(function (item) {
            if (item.value !== node.attrs[item.name]) {
              flag = false;
            }
            return flag;
          });
        }
        return flag;
      }
      var items;
      function scan(node) {
        if (check(node)) {
          if (items) {
            items.push(node);
          }
          return node;
        }
        var result;
        if (node.nodes) {
          node.nodes.every(function (item) {
            result = scan(item);
            return items || !result;
          });
        }
        return result;
      }
      if (all) {
        items = [];
        scan(tokens);
        return items;
      }
      else {
        return scan(tokens);
      }
    }