Using analog pins as digital on Leonardo

Close to that.

The basic Arduino pin numbering scheme is first digital only pins then analog capable pins,
on a Nano there are even pins that have only analog capability.
On a Leonardo, the first analog capable pin is 18 and there are 12 of them,
all can be used as digital I/Os also.

PIN_Ax or Ax are merely constants that evaluate to the respective (digital) pin numbers.

analogRead and analogWrite accept numbers between zero and the number of analog pins-1
as well as the pin number as an additional commodity.