Posted 2 years ago by Valéry Sablonnière - Staubli
Version: 22.1.3
Avatar

Hi,

I would like to use SyntaxEditor with .NET language, but I'm not sure that "top-level statements" are supported.

The need is to propose a C# script editor (to edit .csx files) and be able to declare methods and variables without creating classes.

Comments (8)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The .NET Languages Add-on currently supports through C# 8 syntax, and top-level statements are a C# 9 feature.  We will add your request to the TODO item for upgrading the add-on for C# 9 features.


Actipro Software Support

Posted 2 years ago by StockSharp
Avatar

Yes please, same, waiting for this useful feature.

Posted 7 months ago by Valéry Sablonnière - Staubli
Avatar

Hello,

1 year later, it seems that this feature is still not implemented, will it be integrated and when ?

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We had some other projects the past year that took longer than we had hoped.  We plan to cycle back and work on SyntaxEditor updates again soon, once we get past what we are currently on.


Actipro Software Support

Answer - Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

As an update to this thread, we expect to launch C# 9.0 support, including top-level statements, for the SyntaxEditor .NET Languages Add-on in v24.1.


Actipro Software Support

Posted 5 months ago by Valéry Sablonnière - Staubli
Avatar

Great news, thank you !!

Posted 4 months ago by StockSharp
Avatar

I've recomment to support for https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10#file-scoped-namespace-declaration feature. Right now it is like a standard to create all new code outlined.

You no need support all features I suppose (some features really exotic and more like experimental). But major features in each C# lang versions should be present in your parser. Good for you - this features are really not to much. For example, in C# 11 it is only generic attributes and raw literals (not sure this is really required to make some changes in the parser) that I've seen in real apps sources.

So my proposal is - do not waste a time for support all features in news lang versions. Just a really popular and usefull things are really need (by feedbacks you can understand what is popular and not).

Posted 4 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

It would be nice to do that since there are some much-less used features that can take time to implement, however there are a couple issues with that approach:

  1. We need to be able to clearly say which version of C# we support.  If we only implemented selected version features, we would no longer be able to say we can parse C# properly at a given version.
  2. Many new features introduced build on the backs of previous features.  For instance, C# 9 added more patterns and patterns were introduced in a prior version.  C# 9 adds records but then the next version adds record structs, and so on.  Therefore we really need to make sure we fully implement a version's features for future versions to work properly.  It would be too difficult to track what was or was not implemented years down the road.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.