These are called “non-standard string literals”.
What you are seeing is a string ("registry add <repository url>") that is being passed to a macro (@pkg_str). This is a … slightly strange usage of this syntax sugar which is typically used for processing a string into something string-like (ie a regex, byte array, etc).
The main difference between a macro like this and a function is that the macro processing occurs once - during compilation, the function processing occurs every time it’s called. So using r"regex" allows it to be precompiled.