function MultilineHandler( repl, ttyWrite ) {
	if ( !( this instanceof MultilineHandler ) ) {
		return new MultilineHandler( repl, ttyWrite );
	}

	// Cache a reference to the provided REPL instance:
	this._repl = repl;

	// Cache a reference to the readline interface:
	this._rli = repl._rli;

	// Cache a reference to the output writable stream:
	this._ostream = repl._ostream;

	// Cache a reference to the private readline interface `ttyWrite` to allow calling the method when wanting default behavior:
	this._ttyWrite = ttyWrite;

	// Cache a reference to the command array:
	this._cmd = repl._cmd;

	// Cache a reference to the command queue:
	this._queue = repl._queue;

	// Initialize an internal object for command history:
	this._history = {};
	this._history.list = repl._history;
	this._history.index = 0; // index points to the next "previous" command in history
	this._history.prefix = '';

	// Initialize an internal status object for multi-line mode:
	this._multiline = {};
	this._multiline.active = false;
	this._multiline.trigger = false;
	this._multiline.pasteMode = false;

	// Initialize a buffer for caching input lines:
	this._lines = [];

	// Initialize a variable storing current line index:
	this._lineIndex = 0;

	// Initialize a buffer for storing code after cursor when manually entering multi-line mode:
	this._remainingLine = '';

	return this;
}
Constructor for creating a multi-line handler.

@private
@constructor
@param {REPL} repl - REPL instance
@param {Function} ttyWrite - function to trigger default behavior of a keypress
@returns {MultilineHandler} multi-line handler instance