PDA

View Full Version : Bug:: Suggestion:: C#, Everything is an identifier?!


Jobol
13-Dec-2007, 05:34 PM
Hi,

I am trying out the new syntax coloring. So far so good, except that when I change the "Identifier", all my code changes, classes, objects, methods, heck even my using statements!

Are these all supposed to be "identifiers"? or what is an "identifier" exactly?

Now, I don't know the power of the syntax parser, but a entry called "Type Identifier" would be greatly appreciated. It would highlight the types, mainly classes.

Example:

http://img96.imageshack.us/img96/2883/samplelj3.png

Here is how it looks with BC3

http://img528.imageshack.us/img528/2563/sample2oi4.png

Craig
14-Dec-2007, 09:28 AM
"Identifier" is pretty much any alphanumeric string in the file if it isn't covered by one of the other types. Types, variables, and function names would all fall under that category.

The parser is currently performing simple regular expression matches and doesn't maintain any sort of state from one RE to another. It definitely is not possible to differentiate types/variables/etc based on where they occur. If you follow a strict naming convention you could try using that. In your samples you could add a new type that has to start with a capital letter and call it "type" or something, but it will still catch your function calls unless you make them something else and include the ( in the RE for them.