[Mono-dev] Using Mono.CSharp in a syntax highlighting engine

2011-01-26 Thread David Mitchell
A couple weeks ago, I started playing around with Mono.CSharp to see if I could 
get enough information from it to hook it up to a syntax highlighter. In order 
to do so, I would need to be able to get a mapping of ranges of characters to 
lexical values (keyword, type name, etc.). After some poking around, I was 
finally able to get a very limited amount of information (mostly with respect 
to the namespaces found in a file), but not nearly enough to do what I want.

Was this an anticipated use of Mono.CSharp? Does anyone have any pointers for 
how to use it in this manner?

Thanks,
— Dave
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Using Mono.CSharp in a syntax highlighting engine

2011-01-26 Thread Miguel de Icaza
Hello,

 Was this an anticipated use of Mono.CSharp? Does anyone have any pointers
 for how to use it in this manner?

To generate code dynamically from C# text.The use as a syntax
highlighter is probably not going to be very good.

You found a first few issues with it, but you will run into more.
The internal tree created during parsing does not really correspond
with a textual interpretation of the source, but a transformation that
is useful by the compiler.   So you would have to undo that in several
places, or fork the code for your particular needs.

Miguel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Using Mono.CSharp in a syntax highlighting engine

2011-01-26 Thread Rafael Teixeira
Why don't you look inside/reuse MonoDevelop's C# Syntax-Highlighter?

Rafael Monoman Teixeira
---
We live in a world operated by science and technology. We have also
arranged things so that almost no one understands science and
technology. This is a prescription for disaster. We might get away
with it for a while, but sooner or later this combustible mixture of
ignorance and power is going to blow up in our faces.
-Carl Sagan



On Wed, Jan 26, 2011 at 3:13 PM, David Mitchell dmitch...@logos.com wrote:
 A couple weeks ago, I started playing around with Mono.CSharp to see if I
 could get enough information from it to hook it up to a syntax highlighter.
 In order to do so, I would need to be able to get a mapping of ranges of
 characters to lexical values (keyword, type name, etc.). After some poking
 around, I was finally able to get a very limited amount of information
 (mostly with respect to the namespaces found in a file), but not nearly
 enough to do what I want.
 Was this an anticipated use of Mono.CSharp? Does anyone have any pointers
 for how to use it in this manner?
 Thanks,
 — Dave
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list