Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Unfortunately, I cannot adequately answer your question, but if you look at the examples of C# extensions on Miguel de Icaza's blog, you will notice that all of them take the form of patches to the compiler, not plugins or extensions. This seems to indicate that there is no such API.</p> <p>Note that all of these examples are of much smaller scope than what you seem to be working on:</p> <ul> <li><a href="http://themonkeysgrinder.blogspot.com/2009/07/cer.html" rel="nofollow">Parameterless Anonymous Methods</a> (this post actually explicitly mentions concerns about the maintainability of such language extensions)</li> <li><a href="http://tirania.org/blog/archive/2009/Dec-20.html" rel="nofollow">String Interpolation</a></li> <li><a href="http://tirania.org/blog/archive/2009/Dec-23.html" rel="nofollow">Destructuring Assignment for Tuples</a></li> <li><a href="http://evain.net/blog/articles/2010/08/09/a-river-of-t" rel="nofollow">Syntactic Sugar for <code>IEnumerable</code></a></li> </ul> <p>These are mostly localized syntactic sugar, with no "interesting" behavior. The fourth patch, for example, implements Cω's syntactic sugar for <code>IEnumerable</code>s, but without any of Cω's semantics that make this syntax interesting. If you look at the patch you can see that it literally does stupid syntactical expansion of <code>~T</code> &rarr; <code>IEnumerable&lt;T&gt;</code>, as opposed to Cω, where member access and method invocation are properly lifted over streams.</p> <p><a href="https://connect.microsoft.com/Phoenix" rel="nofollow">Microsoft Research's Phoenix Compiler Pipeline</a> was once explicitly touted as the solution to such extensibility problems, but it seems that it now focuses mostly on optimizations and analysis on the IR level in a code generation backend. In fact, I'm not even sure if the project is even still alive.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload