This project is read-only.

How do you set custom language operator?

Topics: Developer Forum, User Forum
Feb 24, 2013 at 7:32 PM
Hi,

I made a custom lang config file using the builtin cs.xml file

When I run it in the sample app, it's rendering everything after single quote with a blueish green back-color. I don't want to treat single quote as a "operator".

Take a look at this screenshot -> http://i.imgur.com/pg8HqVq.png

How do I control which charater is treated as a operator and which isn't?
Feb 24, 2013 at 11:09 PM
Basically, as far as I understand it, you can't. If you use one of the built-in lexers (C#, in this case), you can only change colors, you can't change the logic. You should try building your own lexer if you really need custom logic, or you could try to find a lexer that more matches the highlighting rules you need.
Feb 24, 2013 at 11:50 PM
Thanks for that info, had no idea. I am going to try looking for some guides on creating custom lexar.
Feb 25, 2013 at 2:05 PM
A good start may be to check out the INI lexer built into the SCide project. If you manage to create anything more complex that works, feel free to share it with us, creating lexers is a complicated subject, and many people have difficulty finding good examples.