Posted 10 years ago by KC
Version: 4.0.0281
Avatar
I have a block of code that is dynamically generated that seems fine, but, the editor indicates some syntax error (by underlining the first character of the sub). I'm not sure what is wrong or what is causing that behavior.

If I use the code as is, it actually operates just fine... It is always the "first" subroutine that gets marked the same way. In the sample below, the letter "P" in the first routine (from Public) gets underlined with red as a syntax error.
#Region "Main"
' Main subroutine
Public Sub Main()
    Me.Sub1
End Sub
#End Region

#Region "Sub1"
' Sub1
Private Sub Sub1()
    ' Code goes here
End Sub
#End Region

Comments (3)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Which language are you using to parse this?

If you are using the .NET add-on version, that requires that you have a full compilation unit whereas you just have a fragment here (no parent class, etc.). Thus it would make a syntax error on the first inappropriate token. You can hover over the error to get more info.


Actipro Software Support

Posted 10 years ago by KC
Avatar
Hovering did not show anything... that's why i asked what the error was.

I found the problem in the HeaderText.

All of the code we are displaying in the editor is dynamically generated, so, it is often difficult to identify the problem right away.

Thanks
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Without seeing it and without knowing more about what language you are using and how you are using it, it's hard to tell you anything else. Maybe try loading your language in the SDI Editor sample and look at the errors list at the bottom to see what it says.

Either that or make a simple sample project that shows the problem and email it over.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 9 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.