Get the next token in token array based on current_token.

If the end of the list is reached, start again from the begining.

Property definitions

github $ GithubWallet :: get_next_token
	# Get the next token in token `array` based on `current_token`.
	#
	# If the end of the list is reached, start again from the begining.
	fun get_next_token: String do
		if tokens.is_empty then
			return get_github_oauth
		end
		var token = current_token

		if current_index < tokens.length - 1 then
			current_index += 1
		else
			current_index = 0
		end
		return token
	end
lib/github/wallet.nit:129,2--144,4