static LexicalMacro AsDelegate(MethodInfo method, IMessageSink sink, object instance)
{
try {
return (LexicalMacro)Delegate.CreateDelegate(typeof(LexicalMacro), method.IsStatic ? null : instance, method);
} catch (Exception e) {
sink.Write(Severity.Note, method.DeclaringType, "Macro '{0}' is uncallable: {1}", method.Name, e.Message);
return null;
}
}