[Monodevelop-devel] Razor syntax issues - GSoC

Sparek sparekd at gmail.com
Thu May 17 18:12:27 UTC 2012


I’ve been accepted for Google Summer of Code with project ‘Support for 
ASP .NET MVC in MonoDevelop’ where my goals for the second half of 
coding are to create Razor syntax highlighter and hopefully code 
completion engine. I’ve been investigating the existing code - the 
parsers, highlighters and code completion engines, especially those in 
AspNet Addin, and the relations between all those parts. I think I 
understand how they work, but I have some questions to the more 
experienced developers which could help me understand better the code 
and prepare a good, working implementation.

I’d like to start my implementation with syntax highlighter, which is 
probably an easier part. Creating XML syntax mode seems to not be enough 
for Razor syntax, so I decided to create the highlighter in C#, deriving 
from Mono.TextEditor.Highlighting.SyntaxMode. AspNet SyntaxMode may be a 
good reference here, because I’ll be facing similar issues related to 
passing some fragments from html to C# engines. Is it a good idea?

As you probably know, Razor parser was open-sourced a few weeks ago, so 
the best approach is to use the working solution and integrate it with 
MD. I’m trying to understand the code, and as I can see a lot of things 
were implemented, e.g. parser, tokenizer, editor-related classes 
well as classes like AutoCompleteEditHandler, but I’m not yet aware to 
what extent it’ll be possible to use it in my project. My idea is to 
create wrappers around the open-sourced code and integrate them with MD 
architecture and extension points.Is it ok?

Generally, I have a vision of implementation, but I’d like to ask you 
for some high-level advice. Are there any pitfalls I can’t see, or 
should I avoid any specific approaches? As more experienced developers, 
maybe you have your own ideas or tips related to integrating the Razor 
parser with MD that might help me? Of course I’ll be investigating the 
code deeper and deeper and my vision of the project will soon get clear, 
but any help will be welcome, because I really would like to do this in 
a good, proper way.
Thanks in advance.

Piotr Dowgiallo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-devel-list/attachments/20120517/b342d940/attachment.html>

More information about the Monodevelop-devel-list mailing list