dotnet / dotnet/vblang

Allow directives to in the middle of VB statements

Open
#357 17 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

I would like to prototype allowing Directives after an Explicit Line Continuation (WITH COMMENT). This is allowed in C# and is useful to allow optional attributes before a Function, conditional list initialization and other places within a statement where Directives are not allowed in VB.

I am not sure without testing if just an _ without a comment would work with the IDE where today unnecessary _ are removed upon return or if this feature would be accepted with this requirement.

```VB
Module M
Sub Main()
Dim I As Integer _ ' Comment
#If something
= 1
#Else
= 2
#End if
End Sub
End Module
```
Is there interest in this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.