The bug
Macro entries, which start with $
in an mcfunction file, cannot include $(
as a literal because they are attempted to be parsed as parameters, not as literal segments.
Workaround
You can workaround this by instantiating a macro with the argument $(
.
macro.mcfunction
$say $(a)
When you run the following command,
function macro {a: "$("}
$say $(a)
will become say $(
after instantiation.
This is more suggesting the addition of an escaping method than an actual bug. This report can literally be written as "syntax reader does not read syntax indicator as not a syntax indicator" which, as you may guess, is not a mistake. :/