bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js
function(isEmpty, isDefault) {
			var context = this.switchContext;

			if (!context.hasCase) {
				return;
			}

			/*
			 * Merge forks.
			 * The parent fork context has two segments.
			 * Those are from the current case and the body of the previous case.
			 */
			var parentForkContext = this.forkContext;
			var forkContext = this.pushForkContext();

			forkContext.add(parentForkContext.makeNext(0, -1));

			/*
			 * Save `default` chunk info.
			 * If the `default` label is not at the last, we must make a path from
			 * the last `case` to the `default` chunk.
			 */
			if (isDefault) {
				context.defaultSegments = parentForkContext.head;
				if (isEmpty) {
					context.foundDefault = true;
				} else {
					context.defaultBodySegments = forkContext.head;
				}
			} else {
				if (!isEmpty && context.foundDefault) {
					context.foundDefault = false;
					context.defaultBodySegments = forkContext.head;
				}
			}

			context.lastIsDefault = isDefault;
			context.countForks += 1;
		}
function(isEmpty, isDefault) {
			var context = this.switchContext;

			if (!context.hasCase) {
				return;
			}

			/*
			 * Merge forks.
			 * The parent fork context has two segments.
			 * Those are from the current case and the body of the previous case.
			 */
			var parentForkContext = this.forkContext;
			var forkContext = this.pushForkContext();

			forkContext.add(parentForkContext.makeNext(0, -1));

			/*
			 * Save `default` chunk info.
			 * If the `default` label is not at the last, we must make a path from
			 * the last `case` to the `default` chunk.
			 */
			if (isDefault) {
				context.defaultSegments = parentForkContext.head;
				if (isEmpty) {
					context.foundDefault = true;
				} else {
					context.defaultBodySegments = forkContext.head;
				}
			} else {
				if (!isEmpty && context.foundDefault) {
					context.foundDefault = false;
					context.defaultBodySegments = forkContext.head;
				}
			}

			context.lastIsDefault = isDefault;
			context.countForks += 1;
		}
function ( isEmpty , isDefault ) { var context = this . switchContext ; if ( ! context . hasCase ) { return ; } /*
			 * Merge forks.
			 * The parent fork context has two segments.
			 * Those are from the current case and the body of the previous case.
			 */ var parentForkContext = this . forkContext ; var forkContext = this . pushForkContext ( ) ; forkContext . add ( parentForkContext . makeNext ( 0 , - 1 ) ) ; /*
			 * Save `default` chunk info.
			 * If the `default` label is not at the last, we must make a path from
			 * the last `case` to the `default` chunk.
			 */ if ( isDefault ) { context . defaultSegments = parentForkContext . head ; if ( isEmpty ) { context . foundDefault = true ; } else { context . defaultBodySegments = forkContext . head ; } } else { if ( ! isEmpty && context . foundDefault ) { context . foundDefault = false ; context . defaultBodySegments = forkContext . head ; } } context . lastIsDefault = isDefault ; context . countForks += 1 ; }
Makes a code path segment for a `SwitchCase` node.

@param {boolean} isEmpty - `true` if the body is empty.
@param {boolean} isDefault - `true` if the body is the default case.
@returns {void}
Makes a code path segment for a SwitchCase node .