|
3079 | 3079 | </dict>
|
3080 | 3080 | <dict>
|
3081 | 3081 | <key>match</key>
|
3082 |
| - <string>\.(?=\$)</string> |
| 3082 | + <string>\.(?=['\x{2018}-\x{201B}"\x{201C}-\x{201E}\s{(,;&|)}$])</string> |
3083 | 3083 | <key>name</key>
|
3084 | 3084 | <string>string.unquoted.argument.powershell</string>
|
3085 | 3085 | </dict>
|
3086 | 3086 | <dict>
|
3087 | 3087 | <key>begin</key>
|
3088 | 3088 | <string>(?=[^\s{(,;&|)}])</string>
|
3089 | 3089 | <key>alternateBegin</key>
|
3090 |
| - <string>(?=[^\x{2018}-\x{201B}"\x{201C}-\x{201E}\s\[{(,;&|)}$@])|(?<=\S)(?=[$@<>])</string> |
| 3090 | + <string>(?=[^'\x{2018}-\x{201B}"\x{201C}-\x{201E}\s\[{(,;&|)}$@])|(?<=\S)(?=[$@<>])</string> |
3091 | 3091 | <key>end</key>
|
3092 | 3092 | <string>(?=[\s{(,;&|)}])</string>
|
3093 | 3093 | <key>contentName</key>
|
|
5123 | 5123 | <key>name</key>
|
5124 | 5124 | <string>punctuation.separator.comma.powershell</string>
|
5125 | 5125 | </dict>
|
| 5126 | + <dict> |
| 5127 | + <key>match</key> |
| 5128 | + <string>[^\s\[\]+,]+</string> |
| 5129 | + <key>name</key> |
| 5130 | + <string>invalid.character.powershell</string> |
| 5131 | + </dict> |
5126 | 5132 | </array>
|
5127 | 5133 | </dict>
|
5128 | 5134 | <dict>
|
|
5183 | 5189 | </dict>
|
5184 | 5190 | <dict>
|
5185 | 5191 | <key>match</key>
|
5186 |
| - <string>(?<!])[^\s\[\]+,]+</string> |
| 5192 | + <string>(?<!])[^\s\[\]\(+,]+</string> |
5187 | 5193 | <key>name</key>
|
5188 | 5194 | <string>invalid.character.powershell</string>
|
5189 | 5195 | </dict>
|
|
5221 | 5227 | </dict>
|
5222 | 5228 | </array>
|
5223 | 5229 | </dict>
|
| 5230 | + <key>advanceToArgument</key> |
| 5231 | + <dict> |
| 5232 | + <key>comment</key> |
| 5233 | + <string>consume spaces and comments (but not unescaped line ends) until the next token appears</string> |
| 5234 | + <key>begin</key> |
| 5235 | + <string>\G(?=[\s]|<#|`\s)</string> |
| 5236 | + <key>end</key> |
| 5237 | + <string>(?!\s)(?!$)|$(?=\n)</string> |
| 5238 | + <key>applyEndPatternLast</key> |
| 5239 | + <true/> |
| 5240 | + <key>patterns</key> |
| 5241 | + <array> |
| 5242 | + <dict> |
| 5243 | + <key>match</key> |
| 5244 | + <string>`\n</string> |
| 5245 | + <key>name</key> |
| 5246 | + <string>constant.character.escape.powershell</string> |
| 5247 | + </dict> |
| 5248 | + <dict> |
| 5249 | + <key>comment</key> |
| 5250 | + <string>useless escape, and doesn't count as a token</string> |
| 5251 | + <key>match</key> |
| 5252 | + <string>`\s</string> |
| 5253 | + <key>name</key> |
| 5254 | + <string>invalid.character.escape.powershell</string> |
| 5255 | + </dict> |
| 5256 | + <dict> |
| 5257 | + <key>include</key> |
| 5258 | + <string>#commentBlock</string> |
| 5259 | + </dict> |
| 5260 | + </array> |
| 5261 | + </dict> |
5224 | 5262 | <key>advanceToToken</key>
|
5225 | 5263 | <dict>
|
5226 | 5264 | <key>comment</key>
|
5227 | 5265 | <string>consume spaces and comments and line ends until the next token appears</string>
|
5228 | 5266 | <key>begin</key>
|
5229 |
| - <string>\G(?=[\s#]|<#|`\n)</string> |
| 5267 | + <string>\G(?=[\s#]|<#|`\s)</string> |
5230 | 5268 | <key>end</key>
|
5231 | 5269 | <string>(?!\s)(?!$)</string>
|
5232 | 5270 | <key>applyEndPatternLast</key>
|
|
5239 | 5277 | <key>name</key>
|
5240 | 5278 | <string>constant.character.escape.powershell</string>
|
5241 | 5279 | </dict>
|
| 5280 | + <dict> |
| 5281 | + <key>comment</key> |
| 5282 | + <string>useless escape, and doesn't count as a token</string> |
| 5283 | + <key>match</key> |
| 5284 | + <string>`\s</string> |
| 5285 | + <key>name</key> |
| 5286 | + <string>invalid.character.escape.powershell</string> |
| 5287 | + </dict> |
5242 | 5288 | <dict>
|
5243 | 5289 | <key>include</key>
|
5244 | 5290 | <string>#commentLine</string>
|
|
7095 | 7141 | <true/>
|
7096 | 7142 | <key>patterns</key>
|
7097 | 7143 | <array>
|
| 7144 | + <dict> |
| 7145 | + <key>include</key> |
| 7146 | + <string>#advanceToArgument</string> |
| 7147 | + </dict> |
7098 | 7148 | <dict>
|
7099 | 7149 | <key>begin</key>
|
7100 |
| - <string>\G(?![;&|)}]|$)</string> |
| 7150 | + <string>(?<=[\s>]|\G|^)(?![\s#;&|)}]|<#|$|`\s)</string> |
7101 | 7151 | <key>end</key>
|
7102 |
| - <string>(?![\s#]|<#|`\n)|$</string> |
7103 |
| - <key>applyEndPatternLast</key> |
7104 |
| - <false/> |
| 7152 | + <string>(?!\G)</string> |
| 7153 | + <key>name</key> |
| 7154 | + <string>meta.argument.redirect-file.powershell</string> |
7105 | 7155 | <key>patterns</key>
|
7106 | 7156 | <array>
|
7107 | 7157 | <dict>
|
| 7158 | + <key>comment</key> |
| 7159 | + <string>`,`, `<` and `>` not permitted here</string> |
7108 | 7160 | <key>match</key>
|
7109 |
| - <string>`\n</string> |
| 7161 | + <string>[,<>]</string> |
7110 | 7162 | <key>name</key>
|
7111 |
| - <string>constant.character.escape.powershell</string> |
| 7163 | + <string>invalid.source.powershell</string> |
7112 | 7164 | </dict>
|
7113 | 7165 | <dict>
|
7114 | 7166 | <key>include</key>
|
7115 |
| - <string>#commentBlock</string> |
7116 |
| - </dict> |
7117 |
| - <dict> |
7118 |
| - <key>begin</key> |
7119 |
| - <string>(?![\s#;&|)}]|<#|$|`\n)</string> |
7120 |
| - <key>end</key> |
7121 |
| - <string>(?!\G)</string> |
7122 |
| - <key>name</key> |
7123 |
| - <string>meta.argument.redirect-file.powershell</string> |
7124 |
| - <key>patterns</key> |
7125 |
| - <array> |
7126 |
| - <dict> |
7127 |
| - <key>comment</key> |
7128 |
| - <string>`,`, `<` and `>` not permitted here</string> |
7129 |
| - <key>match</key> |
7130 |
| - <string>[,<>]</string> |
7131 |
| - <key>name</key> |
7132 |
| - <string>invalid.source.powershell</string> |
7133 |
| - </dict> |
7134 |
| - <dict> |
7135 |
| - <key>include</key> |
7136 |
| - <string>#argument</string> |
7137 |
| - </dict> |
7138 |
| - </array> |
| 7167 | + <string>#argument</string> |
7139 | 7168 | </dict>
|
7140 | 7169 | </array>
|
7141 | 7170 | </dict>
|
|
0 commit comments