constructor(id, allPrevSegments, reachable) {
		/**
		 * The identifier of this code path.
		 * Rules use it to store additional information of each rule.
		 * @type {string}
		 */
		this.id = id;

		/**
		 * An array of the next reachable segments.
		 * @type {CodePathSegment[]}
		 */
		this.nextSegments = [];

		/**
		 * An array of the previous reachable segments.
		 * @type {CodePathSegment[]}
		 */
		this.prevSegments = allPrevSegments.filter(isReachable);

		/**
		 * An array of all next segments including reachable and unreachable.
		 * @type {CodePathSegment[]}
		 */
		this.allNextSegments = [];

		/**
		 * An array of all previous segments including reachable and unreachable.
		 * @type {CodePathSegment[]}
		 */
		this.allPrevSegments = allPrevSegments;

		/**
		 * A flag which shows this is reachable.
		 * @type {boolean}
		 */
		this.reachable = reachable;

		// Internal data.
		Object.defineProperty(this, "internal", {
			value: {
				// determines if the segment has been attached to the code path
				used: false,

				// array of previous segments coming from the end of a loop
				loopedPrevSegments: [],
			},
		});

		/* c8 ignore start */
		if (debug.enabled) {
			this.internal.nodes = [];
		} /* c8 ignore stop */
	}
Creates a new instance.
@param {string} id An identifier.
@param {CodePathSegment[]} allPrevSegments An array of the previous segments.
  This array includes unreachable segments.
@param {boolean} reachable A flag which shows this is reachable.