Skip to content

Commit

Permalink
also scope the \n at the end of line comments as comment.line (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall authored and TylerLeonhardt committed Jul 26, 2018
1 parent 146e421 commit 472c944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PowerShellSyntax.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
</dict>
</dict>
<key>end</key>
<string>$</string>
<string>$\n?</string>
<key>name</key>
<string>comment.line.powershell</string>
<key>patterns</key>
Expand Down

1 comment on commit 472c944

@msftrncs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keith-hall, May I ask what the purpose this served was? I am trying to solve for enumerations (enum) and I am having to remove this change in order to get the inner element scoping to work correctly, because I need to detect the \n to end 1 assignment and start the next, if a comment appears on the line, the scoping wouldn't reset on the next.

[flags()] enum CrazyEnums {
    Hello = 1; hello3 = "6"
    Hello2 = 3 #comment here blocks first element of next line from scoping with original comment_line consuming newline.
    hello5  ; hello6 ; hello7 ="100"
    Hello_There but this is not valid

}

This is an example of correct behavior once I removed this change:
image

But here is without the change removed:
image

Please sign in to comment.