function wrapInSourceNode(prefix, chunk, location, suffix, name) {
  // If location is not defined (for example, AST node was replaced
  // by a plugin and does not provide location information, see
  // plugin-api.spec.js/"can replace parser") returns original chunk
  if (location) {
    return new SourceNode(null, null, location.source, [
      prefix,
      toSourceNode(chunk, location, name),
      // Mark end location with column information otherwise
      // mapping will be always continue to the end of line
      new SourceNode(
        location.end.line,
        // `source-map` columns are 0-based, peggy columns is 1-based
        location.end.column - 1,
        location.source,
        suffix
      ),
    ]);
  }

  return new SourceNode(null, null, null, [prefix, chunk, suffix]);
}
/**
 * Wraps code line that consists from three parts into `SourceNode`.
 *
 * @param {string} prefix String that will be prepended before mapped chunk
 * @param {string} chunk Chunk for mapping (possible multiline)
 * @param {import("../../peg").Location} location
 *        Location that represents chunk in the grammar
 * @param {string} suffix String that will be appended after mapped chunk
 * @param {string?} name Name of the code chunk
 *
 * @returns {SourceNode} New node that represents code chunk.
 *          Code will be splitted by lines if necessary
 */
Wraps code line that consists from three parts into `SourceNode`.

@returns {SourceNode} New node that represents code chunk.
Code will be splitted by lines if necessary
Wraps code line that consists from three parts into ` SourceNode ` . @returns { SourceNode } New node that represents code chunk . Code will be splitted by lines if necessary
function wrapInSourceNode(prefix, chunk, location, suffix, name) {
  if (location) {
    return new SourceNode(null, null, location.source, [
      prefix,
      toSourceNode(chunk, location, name),
      new SourceNode(
        location.end.line,
        location.end.column - 1,
        location.source,
        suffix
      ),
    ]);
  }
  return new SourceNode(null, null, null, [prefix, chunk, suffix]);
}
function wrapInSourceNode ( prefix , chunk , location , suffix , name ) { if ( location ) { return new SourceNode ( null , null , location . source , [ prefix , toSourceNode ( chunk , location , name ) , new SourceNode ( location . end . line , location . end . column - 1 , location . source , suffix ) , ] ) ; } return new SourceNode ( null , null , null , [ prefix , chunk , suffix ] ) ; }
Wraps code line that consists from three parts into `SourceNode`.
Wraps code line that consists from three parts into ` SourceNode ` .
// If location is not defined (for example, AST node was replaced // by a plugin and does not provide location information, see // plugin-api.spec.js/"can replace parser") returns original chunk // Mark end location with column information otherwise // mapping will be always continue to the end of line // `source-map` columns are 0-based, peggy columns is 1-based