|
512 | 512 | <key>match</key> |
513 | 513 | <string>;</string> |
514 | 514 | <key>name</key> |
515 | | - <string>punctuation.terminator.statement.powershell</string> |
| 515 | + <string>punctuation.terminator.assignment.enum-member.powershell</string> |
516 | 516 | </dict> |
517 | 517 | <dict> |
518 | 518 | <key>begin</key> |
|
1022 | 1022 | <key>comment</key> |
1023 | 1023 | <string>-parallel parameter can only be used in a workflow, consider using meta scopes, and an injection to properly catch this</string> |
1024 | 1024 | <key>match</key> |
1025 | | - <string>(?i:[\x{2013}-\x{2015}-]parallel)(?:(:)?|(?![^\s{(,;&|)}]))</string> |
| 1025 | + <string>(?i:[\x{2013}-\x{2015}-]parallel)(?:(:)|(?=[\s\[{(,;&|)}]))</string> |
1026 | 1026 | <key>beginCaptures</key> |
1027 | 1027 | <dict> |
1028 | 1028 | <key>1</key> |
|
1834 | 1834 | <array> |
1835 | 1835 | <dict> |
1836 | 1836 | <key>match</key> |
1837 | | - <string>((?i:[\x{2013}-\x{2015}-](regex|wildcard|exact|casesensitive)))(?:(:)?|(?![^\s{(,;&|)}]))</string> |
| 1837 | + <string>((?i:[\x{2013}-\x{2015}-](regex|wildcard|exact|casesensitive)))(?:(:)|(?=[\s\[{(,;&|)}]))</string> |
1838 | 1838 | <key>captures</key> |
1839 | 1839 | <dict> |
1840 | 1840 | <key>1</key> |
|
1853 | 1853 | <key>comment</key> |
1854 | 1854 | <string>-file is special case, needs file argument, no condition expression</string> |
1855 | 1855 | <key>begin</key> |
1856 | | - <string>((?i:[\x{2013}-\x{2015}-]file))(?:(:)?|(?![^\s{(,;&|)}]))</string> |
| 1856 | + <string>((?i:[\x{2013}-\x{2015}-]file))(?:(:)|(?=[\s\[{(,;&|)}]))</string> |
1857 | 1857 | <key>beginCaptures</key> |
1858 | 1858 | <dict> |
1859 | 1859 | <key>1</key> |
|
2255 | 2255 | <key>comment</key> |
2256 | 2256 | <string>-supportedcommand is special case, array of arguments</string> |
2257 | 2257 | <key>begin</key> |
2258 | | - <string>((?i:[\x{2013}-\x{2015}-]supportedcommand))(?:(:)?|(?![^\s{(,;&|)}]))</string> |
| 2258 | + <string>((?i:[\x{2013}-\x{2015}-]supportedcommand))(?:(:)|(?=[\s\[{(,;&|)}]))</string> |
2259 | 2259 | <key>beginCaptures</key> |
2260 | 2260 | <dict> |
2261 | 2261 | <key>1</key> |
|
2557 | 2557 | <key>patterns</key> |
2558 | 2558 | <array> |
2559 | 2559 | <dict> |
2560 | | - <key>comment</key> |
2561 | | - <string>`||` and `&&` conditional terminators are reserved.</string> |
2562 | | - <key>match</key> |
2563 | | - <string>\|\||&&</string> |
2564 | | - <key>name</key> |
2565 | | - <string>invalid.reserved.powershell</string> |
| 2560 | + <key>include</key> |
| 2561 | + <string>#terminators</string> |
2566 | 2562 | </dict> |
2567 | 2563 | <dict> |
2568 | 2564 | <key>comment</key> |
|
3030 | 3026 | </dict> |
3031 | 3027 | <dict> |
3032 | 3028 | <key>match</key> |
3033 | | - <string>([\x{2013}-\x{2015}-]\p{L}\w*)(:)?</string> |
| 3029 | + <string>([\x{2013}-\x{2015}-]\p{L}[^\s\[{(,;&|)}'"\x{2018}-\x{201E}]*)(?:(:)|(?=[\s\[{(,;&|)}]))</string> |
| 3030 | + <key>old match</key> |
| 3031 | + <string>([\x{2013}-\x{2015}-]\p{L}[\w~`!@#$%^*<?>\]\\/=+-]*)(?:(:)|(?=[\s\[{(,;&|)}]))</string> |
3034 | 3032 | <key>captures</key> |
3035 | 3033 | <dict> |
3036 | 3034 | <key>1</key> |
|
3126 | 3124 | <key>include</key> |
3127 | 3125 | <string>#operators</string> |
3128 | 3126 | </dict> |
| 3127 | + <dict> |
| 3128 | + <key>match</key> |
| 3129 | + <string>`\n</string> |
| 3130 | + <key>name</key> |
| 3131 | + <string>constant.character.escape.powershell</string> |
| 3132 | + </dict> |
3129 | 3133 | <dict> |
3130 | 3134 | <key>ignore</key> |
3131 | 3135 | <string>`</string> |
|
4682 | 4686 | </dict> |
4683 | 4687 | <dict> |
4684 | 4688 | <key>match</key> |
4685 | | - <string>(?i)(?:(?:cmdletbinding|alias|flags|outputtype|parameter|validate(?:not(?:null(?:orempty)?)|count|set|script|range|pattern|length)|allow(?:null|empty(?:collection|string))|supportswildcards|dsc(?:resource|property))(?![.\w+`-]))</string> |
| 4689 | + <string>(?i)(?:(?:cmdletbinding|alias|flags|outputtype|parameter|validate(?:not(?:null(?:orempty)?)|count|set|script|range|pattern|length)|allow(?:null|empty(?:collection|string))|supportswildcards|dsc(?:resource|property)|psdefaultvalue)(?![.\w+`-]))</string> |
4686 | 4690 | <key>name</key> |
4687 | 4691 | <string>support.function.attribute.powershell</string> |
4688 | 4692 | </dict> |
|
5127 | 5131 | <true/> |
5128 | 5132 | <key>patterns</key> |
5129 | 5133 | <array> |
5130 | | - <dict> |
5131 | | - <key>match</key> |
5132 | | - <string>`\n</string> |
5133 | | - <key>name</key> |
5134 | | - <string>constant.character.escape.powershell</string> |
5135 | | - </dict> |
5136 | 5134 | <dict> |
5137 | 5135 | <key>comment</key> |
5138 | 5136 | <string>useless escape, and doesn't count as a token</string> |
|
6130 | 6128 | </dict> |
6131 | 6129 | <dict> |
6132 | 6130 | <key>begin</key> |
6133 | | - <string>=</string> |
| 6131 | + <string>(=)\n?</string> |
6134 | 6132 | <key>beginCaptures</key> |
6135 | 6133 | <dict> |
6136 | | - <key>0</key> |
| 6134 | + <key>1</key> |
6137 | 6135 | <dict> |
6138 | 6136 | <key>name</key> |
6139 | 6137 | <string>keyword.operator.assignment.hashtable-member.powershell</string> |
|
6143 | 6141 | <string>(?=[;}\n])</string> |
6144 | 6142 | <key>patterns</key> |
6145 | 6143 | <array> |
| 6144 | + <dict> |
| 6145 | + <key>include</key> |
| 6146 | + <string>#advanceToToken</string> |
| 6147 | + </dict> |
6146 | 6148 | <dict> |
6147 | 6149 | <key>include</key> |
6148 | 6150 | <string>#command_mode</string> |
6149 | 6151 | </dict> |
6150 | 6152 | </array> |
6151 | 6153 | </dict> |
6152 | 6154 | <dict> |
6153 | | - <key>include</key> |
6154 | | - <string>#terminators</string> |
| 6155 | + <key>match</key> |
| 6156 | + <string>;</string> |
| 6157 | + <key>name</key> |
| 6158 | + <string>punctuation.terminator.assignment.hashtable-member.powershell</string> |
6155 | 6159 | </dict> |
6156 | 6160 | <dict> |
6157 | 6161 | <key>include</key> |
|
6577 | 6581 | <array> |
6578 | 6582 | <dict> |
6579 | 6583 | <key>comment</key> |
6580 | | - <string>`;` resume's in statement mode.</string> |
6581 | | - <key>match</key> |
6582 | | - <string>;</string> |
6583 | | - <key>name</key> |
6584 | | - <string>punctuation.terminator.statement.powershell</string> |
6585 | | - </dict> |
6586 | | - <dict> |
6587 | | - <key>comment</key> |
6588 | | - <string>`,` just continues current mode</string> |
| 6584 | + <string>`||` and `&&` conditional terminators are reserved.</string> |
6589 | 6585 | <key>match</key> |
6590 | | - <string>,</string> |
| 6586 | + <string>\|\||&&</string> |
6591 | 6587 | <key>name</key> |
6592 | | - <string>punctuation.separator.powershell</string> |
| 6588 | + <string>invalid.reserved.powershell</string> |
6593 | 6589 | </dict> |
6594 | 6590 | </array> |
6595 | 6591 | </dict> |
|
6974 | 6970 | <dict> |
6975 | 6971 | <key>patterns</key> |
6976 | 6972 | <array> |
| 6973 | + <dict> |
| 6974 | + <key>include</key> |
| 6975 | + <string>#terminators</string> |
| 6976 | + </dict> |
6977 | 6977 | <dict> |
6978 | 6978 | <key>comment</key> |
6979 | 6979 | <string>`&` resume's in statement mode</string> |
6980 | 6980 | <key>begin</key> |
6981 | | - <string>&(?!&)</string> |
| 6981 | + <string>&</string> |
6982 | 6982 | <key>beginCaptures</key> |
6983 | 6983 | <dict> |
6984 | 6984 | <key>0</key> |
|
0 commit comments