code: function ast(kind) {
      let properties = Array.prototype.slice.call(arguments, 1).reverse();
      return (stack, cb) => {
          let node = { kind: kind };
          properties.forEach(name => {
              if (name.endsWith('?')) {
                  name = name.slice(0, -1);
                  let o = stack[stack.length - 1];
                  if (typeof o === 'object' && name in o) {
                      node[name] = stack.pop()[name];
                  }
              } else {
                  node[name] = stack.pop();
              }
          });
          stack.push(node);
          cb();
      };
  }
docs: /* Create an AST node from the parser stack.