-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F# improvements #1573
F# improvements #1573
Conversation
private public rec return | ||
return! select static struct | ||
then to true try type | ||
then to true try type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about these semicolons here. Are they syntactically correct for F#?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To rephrase, were the old code snippets wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because after type
, inherit
, etc. follow class names.
If that semicolon isn't there, the next keyword will be highlighted as a class name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth adding a test that demonstrates this? Or do we have one for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure we have! class-name_feature.test
Implement a few F# features: 1. [Attributes](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/attributes). 2. [Computation expressions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/computation-expressions) (resolves PrismJS#1459). 3. Class names for type annotations, [casts ](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/casting-and-conversions)(not including `as`), definitions and instancing (resolves PrismJS#1460). 4. Proper support for ([nullable](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/symbol-and-operator-reference/nullable-operators)) [operators](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/symbol-and-operator-reference/).
This PR implements a few F# features:
as
), definitions and instancing (resolves F# type annotations are not highlighted #1460).Example
See for yourself!