src/vs/editor/browser/coreCommands.ts/parse
	export function parse(args: Partial<RawArguments>): ParsedArguments | null {
		let direction: Direction;
		switch (args.to) {
			case RawDirection.Up:
				direction = Direction.Up;
				break;
			case RawDirection.Right:
				direction = Direction.Right;
				break;
			case RawDirection.Down:
				direction = Direction.Down;
				break;
			case RawDirection.Left:
				direction = Direction.Left;
				break;
			default:
				// Illegal arguments
				return null;
		}

		let unit: Unit;
		switch (args.by) {
			case RawUnit.Line:
				unit = Unit.Line;
				break;
			case RawUnit.WrappedLine:
				unit = Unit.WrappedLine;
				break;
			case RawUnit.Page:
				unit = Unit.Page;
				break;
			case RawUnit.HalfPage:
				unit = Unit.HalfPage;
				break;
			case RawUnit.Editor:
				unit = Unit.Editor;
				break;
			case RawUnit.Column:
				unit = Unit.Column;
				break;
			default:
				unit = Unit.WrappedLine;
		}

		const value = Math.floor(args.value || 1);
		const revealCursor = !!args.revealCursor;

		return {
			direction: direction,
			unit: unit,
			value: value,
			revealCursor: revealCursor,
			select: (!!args.select)
		};
	}