function compileCommand( cmd ) {
	var out;
	var tmp;

	// Initialize a command object:
	out = {
		'cmd': cmd
	};

	// Determine whether the command is "asynchronous":
	out.async = hasAsyncDirective( cmd );

	// Attempt to compile the command...
	tmp = compileCode( cmd );
	if ( tmp instanceof Error ) {
		return tmp;
	}
	out.compiled = tmp;

	// Determine whether the command is "silent" (i.e., terminates in a semicolon):
	out.silent = isSilentCommand( cmd );

	return out;
}
Compiles a command.

@private
@param {string} cmd - command string
@returns {(Object|Error)} compiled command or an error