Added support for named arguments for macros

Fixes: #929
Depends on #1084