[nem-en] Re: [nem-feedback] Visual Studio 2005 VSIP package
Kamil Skalski
kamil.skalski at gmail.com
Sun Feb 12 17:25:44 CET 2006
06-02-12, NoiseEHC <NoiseEHC at freemail.hu> napisał(a):
> So here it is.
Ok, so plugin is now publicly available in
http://nemerle.org/svn/vs-plugin/
>
> I removed the brace matching since it requires lexer support.
> Currently I do not know how to do it (either the LexerColorizer should
> differentiate
> between open/close braces or I should use the real lexer but how?)
You should be able to use
def lex = LexerString (buffer);
and
def preparser = PreParser (lex);
def tokens = preparser.PreParse ();
(remember to first initialize environment, so syntax extensions are
loaded from all used macros)
This will give you a Token tree, which you can analyse for keywords
and matchin braces (actually it contains all this information, only
searching through it for specified location must be done). I'm not
sure what will be the performance of this operation, but it would need
experimentation.
> Another problem is that the syntax highlighting is context dependent
> (depends on
> the using statements) and VS provides it with only an int state. So somehow
> it would create a context table. For now it simply uses
> Nemerle.Macros.dll only.
>
> You have to unzip the file to
> C:\Program Files\Visual Studio 2005
> SDK\2005.12\VisualStudioIntegration\Samples\NemerleIntegration\NemerleProject
> because it references files from
> C:\Program Files\Visual Studio 2005
> SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project
> as ..\..\..\Common\etc...
>
> It also loads the macro dll from c:\program
> files\nemerle\Nemerle.Macros.dll so you have to have your Nemerle
> installed there.
I think that our installer should create some env variable, like
NEMERLE_DIR, so tools can easily access the place where Nemerle is
installed.
>
>
> Now the big question:
> Can somebody help me finish this? I would need not only testers with VS
> but somebody with knowledge with the Nemerle
> compiler since the show stopper is that it requires modifying the source...
I think the way to go is to create some small testcases, like in
ncc/testsuite/completion-playground
This way we can focus on making compiler API work in well defined
scenarios. The cruel fact is that at the moment I don't have time for
much more than small fixes and answering questions...
> Will it help if I manage to get some free VS licenses for the
> university? (I think it can be possible as a MS sponsored project.)
>
> > I will send you the latest version tomorrow and you could put it to
> > the repository
> >
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>
>
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list