-
Notifications
You must be signed in to change notification settings - Fork 81
Syntax bug fixes (#68, #77, #84, Range Operator) #100
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
Changes from all commits
91231d1
6ce28ed
84a329d
2bd4472
aeb8f92
e08af71
5fa867c
7cf6280
3b3b8d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,7 +234,7 @@ | |
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>(?<!\w)-([ci]?[lg][te]|eq|ne)</string> | ||
<string>(?<!\w)-([ci]?[lg][te]|eq|ne)(?!\p{L})</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prevents any letters from following logical operators There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's nice. |
||
<key>name</key> | ||
<string>keyword.operator.logical.powershell</string> | ||
</dict> | ||
|
@@ -324,13 +324,19 @@ | |
<string>keyword.operator.other.powershell</string> | ||
</dict> | ||
<dict> | ||
<key>comment</key> | ||
<string>This is very imprecise, is there a syntax for 'must come after...' </string> | ||
<key>match</key> | ||
<string>(?<!\s|^)\.\.(?=\d|\(|\$)</string> | ||
<string>\.\.</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think a simple treatment of the Range Operator might be best. Whenever there is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems fair enough, since I can't think of any other way to use |
||
<key>name</key> | ||
<string>keyword.operator.range.powershell</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This syntax does not correctly capture |
||
</dict> | ||
<dict> | ||
<key>comment</key> | ||
<string>Properties and methods</string> | ||
<key>match</key> | ||
<string>\.(\w)+</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This separates properties and methods from variables. We can probably simplify the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would highlight stuff like |
||
<key>name</key> | ||
<string>entity.name.function.invocation.powershell</string> | ||
</dict> | ||
</array> | ||
<key>repository</key> | ||
<dict> | ||
|
@@ -522,7 +528,7 @@ | |
<key>function</key> | ||
<dict> | ||
<key>begin</key> | ||
<string>((?i:function|configuration|workflow))\s+((?:\p{L}|\d|_|-|\.)+)</string> | ||
<string>(?<!-)((?i:function|configuration|workflow))\s+((?:\p{L}|\d|_|-|\.)+)</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checks for a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need way more than this. E.g. Move-Item MyConfiguration MyWorkflow |
||
<key>beginCaptures</key> | ||
<dict> | ||
<key>0</key> | ||
|
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.
This incorrectly allows
-lexx