src/parser/generated/regexp-tree.js
function Node(node, loc) {
  if (yy.options.captureLocations) {
    node.loc = {
      source: parsingString.slice(loc.startOffset, loc.endOffset),
      start: {
        line: loc.startLine,
        column: loc.startColumn,
        offset: loc.startOffset,
      },
      end: {
        line: loc.endLine,
        column: loc.endColumn,
        offset: loc.endOffset,
      },
    };
  }
  return node;
}
function Node(node, loc) {
  if (yy.options.captureLocations) {
    node.loc = {
      source: parsingString.slice(loc.startOffset, loc.endOffset),
      start: {
        line: loc.startLine,
        column: loc.startColumn,
        offset: loc.startOffset,
      },
      end: {
        line: loc.endLine,
        column: loc.endColumn,
        offset: loc.endOffset,
      },
    };
  }
  return node;
}
Creates an AST node with a location.