Parsing C# code to evaluate expressions (basically, implementing Intellisense)

Posted by halivingston on Stack Overflow See other posts from Stack Overflow or by halivingston
Published on 2010-04-22T04:08:04Z Indexed on 2010/04/22 4:13 UTC
Read the original article Hit count: 168

Filed under:
|
|
|

I'm trying to evaluate C# code as it gets typed, think of it as if I'm trying to write an IDE.

So a person types code, I want to find out what code did he just write:

String x = "";

I want to now register that x is a type of String. And now everytime the user types x again, and I want to show him all the things he can do with x, basically like Visual Studio Intellisense.

Will I need some lexers or parsers for this? Will that make it easier? I've heard VS 2010 has some features around this that Microsoft has released. Any ideas?

© Stack Overflow or respective owner

Related posts about c#

Related posts about parser