I have tried to look into corresponding pins_arduino.h, but unfortunately that file doesn't mention any digital pins. Am I missing something? Is there perhaps a function translating those identifiers like P1.11 to pin numbers?
Thanks. In the meantime, I have finally managed to find the answer to my question:
Long story short, digital pins have the same numbers as their names, ie. D2 is 2, D3 is 3, etc. For some reason, their aliases are not defined in pins_arduino.h, but fix seems to be already merged: