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.
I assume it is supposed to mirror the syntax from the package REPL mode so that typing pkg"add SomePackage" or whatever other operations, is equivalent to activating the Pkg mode (by typing ] and getting the pkg> prompt) and just writing