Create a new Lexer / Layer on C#

Topics: Developer Forum
Nov 20, 2006 at 12:00 PM
Hi, i want to implement a spell checker for ScintillaNet like the one found in tortoisesvn, it simply underlines spell checking errors with a red line.

I tried to look at the lexers on ScintillaNet but i didn't found the code for any, i just found enums for the ones included in the scintilla sources.

Cane anybody give me a simple example in c# for a lexer or layer?

Nov 20, 2006 at 12:41 PM
I am not sure if it's possible to add a new lexer in C#. I hope one of the C/C++ guys in our audience will be able to answer your question for sure. If you have some C++ experience you can probably just look at the C++ lexers in scintilla and rebuild the native control.
Here's something I read in a python script (fromt he C++ project) that seems to say that he hardcodes the lexers into the control (this script generates C++ for any new lexers added):
"# Regenerate the Scintilla and SciTE source files that list
  1. all the lexers and all the properties files.
  2. Should be run whenever a new lexer is added or removed."