Hi All,
I am trying to build language service in windows 2015 which will have syntax coloring feature for test language service which will have its own lexer and parser defined .
I just google out several approaches and found two ways to do that
1: Using Legacy Language Service:
The approach specifies implemeting LanguageService class Provided by MPF and then implemeting the ParseSource methos in that.Here Syntax coloring is implemeted by implemting the IColorizer and IScanner which works hand to hand for doing the corization.
https://msdn.microsoft.com/en-us/library/bb165099.aspx
2 : Using MEF
The other approach tells about using the MEF for creating VSIX extensions. I also find some code snippets on MSDN for some of feature linke intellisence, Light bulp and so on. I am trying to find out how i can achive syntax coloring using MEF with my own lexer and parser defined. After searching i found that we can use Classifier extenion where we can defined the classification types and formats. But i got stuck how i can integrate the Scanner so that it will return me tokens and those token then mapped to classification formats. Is there any inteface available that i can implement which will work hand hand with classifier.
Which approach is better ? Using Legacy language service implemetation or using MEF.
Thanks..
B.