Posted 13 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
Hi,
I have started using 4.0, and it seems like a great upgrade. My users use C#, but I only have them write the inside of functions. For example: they might have a syntax editor where they put in some code like this:
MessageBox.Show();
Then I put some code around it to make it valid C# like this:
public void BeginningEffect()
{
MessageBox.Show()
}
Using the default CSharpSyntaxLanguage, the first example above is not considered valid. My guess is that I want to tell the language that I only want to parse using the AST nodes below BlockStatement, but I don't know how to do that. Any idea?

thanks,
Jake

Comments (3)

Posted 13 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
Also, to add on to my above question how would I define the variables that exist in a class programatically.
public class Simulation
{
   public int X;
   public int Y;

   public void BeginningEffect()
   {
      MessageBox.Show(X.ToString());
   }
}
The only code that users enter is the MessageBox code, but I still need the SyntaxEditor to know of the X and Y fields.

thanks,
Jake
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I think your request is about the same as this one.

Could you read that and post whether it is? One design problem is with the auto-indent feature. We discuss a problem with it at the end of that topic, if we implement this feature that way. We'd love to hear your thoughts.


Actipro Software Support

Posted 13 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
I missed that thread, I will put my thoughts over there.
The latest build of this product (v2018.1 build 0341) was released 8 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.