C# parser problem when enum declaration ends with semicolon

SyntaxEditor .NET Languages Add-on for WPF Forum

The latest build of this product (v25.1.1) was released 3 months ago, which was before this thread was created.
Posted 24 days ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 25.1.0
Platform: .NET 4.8
Environment: Windows 11 (64-bit)
Avatar

Hi,

we upgraded from version 24.1.4 to 25.1.0 and noticed a problem with the C# parser.

If there is a enum declaration that ends with a semicolon, the following types are not resolved correctly. Now the semicolon is optional but allowed nontheless. The problem still exists with 25.1.1.

Example:

public enum ColorsEnum
{
  Red,
  Green,
  Blue
};

public class MyTestClass
{
  public static void Test() // <- missing
  {
  }
}


Best regards, Tobias Lingemann.

Comments (6)

Posted 23 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

I pasted the code snippet you gave in our SyntaxEditor main demo.  I'm not seeing any syntax errors and I see the Test method showing up in IntelliPrompt ok.  Can you please try the same and tell us exactly how to reproduce the problem in our sample?  Thanks!


Actipro Software Support

Posted 21 days ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Okay, so apparently the problem only occurs when the class has an attribute. Any arbitrary attribute name will do. I was able to verify this with the sample browser, but I cannot share screenshots here.

[Modified 21 days ago]


Best regards, Tobias Lingemann.

Posted 21 days ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Unfortunately we found the issue very late in our development process, so that we are in dire need of a quick fix. Either a workaround that can be applied in code or a hotfix release that is based on 25.1.0.


Best regards, Tobias Lingemann.

Answer - Posted 20 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

Thank you for reporting this.  I believe we found the problem and fixed it for v25.1.2.  We just published a preview build of that version beta.3 to nuget.org if you'd like to test with that.


Actipro Software Support

Posted 20 days ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Hi, thank you for the quick fix. The update seems to resolve this issue, but I haven't tested anything else.

We still would prefer a hotfix release, which is based on v25.1.0 and only contains this fix. You don't need to publish the hotfix via nuget.org. I think all we need is a nupkg file for the add-on. This way we only replace the version for the add-on, which still targets v25.1.0 of the other packages.


Best regards, Tobias Lingemann.

Posted 19 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

Please contact us privately via our support email address and reference this thread in your email.  Thanks!


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.