For ratchet on what that does: It tells nim to not really try to make sense of whatever code gets put into the `mkCaster` macro. So you are allowed to have entirely invalid stuff in there, you just need to create NimNodes that contains valid code as the macro output (which you do).
By using proc (or by extension: `typed`), you force nim to do _some_ level of syntax parsing on the input and if your input violates that it throws errors.