|
2714 | 2714 | <key>comment</key>
|
2715 | 2715 | <string>patterns that indicate an expression, might be able to simplify this to include expression_mode and then see if the cursor advanced, sorta, don't forget about 'notCode', maybe check operand/operator only first, as redirect could also be a problem.</string>
|
2716 | 2716 | <key>begin</key>
|
2717 |
| - <string>(?=[$@][{(\w:$?^]|[({]|[,\["\x{201C}-\x{201E}'\x{2018}-\x{201B}])|(?=@?(['\x{2018}-\x{201B}"\x{201C}-\x{201E}])(?:(?<!@\g<1>)|\s*$))|(?=[\x{2013}-\x{2015}-][\s#{(,;|)}<>.!+%*/="\x{201C}-\x{201E}'\x{2018}-\x{201B}\x{2013}-\x{2015}-])</string> |
| 2717 | + <string>(?=[$@][{(\w:$?^]|[({\[,]|@?['"\x{2018}-\x{201E}]|[\x{2013}-\x{2015}-][\s#{(,;|)}<>.!+%*/='"\x{2018}-\x{201E}\x{2013}-\x{2015}-])</string> |
2718 | 2718 | <key>end</key>
|
2719 | 2719 | <string>$(?=\n)|(?=[;)}\]])</string>
|
2720 | 2720 | <key>patterns</key>
|
|
3079 | 3079 | </dict>
|
3080 | 3080 | <dict>
|
3081 | 3081 | <key>match</key>
|
3082 |
| - <string>\.(?=['\x{2018}-\x{201B}"\x{201C}-\x{201E}\s{(,;&|)}$])</string> |
| 3082 | + <string>\.(?=['"\x{2018}-\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{201E}\s\[{(,;&|)}$@])|(?<=\S)(?=[$@<>])</string> |
3091 | 3091 | <key>end</key>
|
3092 | 3092 | <string>(?=[\s{(,;&|)}])</string>
|
3093 | 3093 | <key>contentName</key>
|
|
3906 | 3906 | <array>
|
3907 | 3907 | <dict>
|
3908 | 3908 | <key>match</key>
|
3909 |
| - <string>`[`0abefnrtv"\x{201C}-\x{201E}'\x{2018}-\x{201B}$]</string> |
| 3909 | + <string>`[`0abefnrtv]|^`["\x{201C}-\x{201E}](?=@)</string> |
3910 | 3910 | <key>name</key>
|
3911 | 3911 | <string>constant.character.escape.powershell</string>
|
3912 | 3912 | </dict>
|
|
6343 | 6343 | </dict>
|
6344 | 6344 | <key>quotedStrings_Members</key>
|
6345 | 6345 | <dict>
|
| 6346 | + <key>comment</key> |
| 6347 | + <string>detect all quoted strings (arguments or expressions) starting here</string> |
6346 | 6348 | <key>begin</key>
|
6347 |
| - <string>(?=@?(['\x{2018}-\x{201B}"\x{201C}-\x{201E}])(?:(?<!@\g<1>)|\s*$))</string> |
| 6349 | + <string>(?=@?['"\x{2018}-\x{201E}])</string> |
6348 | 6350 | <key>end</key>
|
6349 | 6351 | <string>(?!\G)</string>
|
6350 | 6352 | <key>applyEndPatternLast</key>
|
6351 | 6353 | <true/>
|
6352 | 6354 | <key>patterns</key>
|
6353 | 6355 | <array>
|
6354 | 6356 | <dict>
|
| 6357 | + <key>comment</key> |
| 6358 | + <string>single quoted strings</string> |
6355 | 6359 | <key>begin</key>
|
6356 |
| - <string>['\x{2018}-\x{201B}]</string> |
| 6360 | + <string>\G['\x{2018}-\x{201B}]</string> |
6357 | 6361 | <key>beginCaptures</key>
|
6358 | 6362 | <dict>
|
6359 | 6363 | <key>0</key>
|
|
6387 | 6391 | </array>
|
6388 | 6392 | </dict>
|
6389 | 6393 | <dict>
|
| 6394 | + <key>comment</key> |
| 6395 | + <string>double quoted here-strings</string> |
6390 | 6396 | <key>begin</key>
|
6391 |
| - <string>@(?:["\x{201C}-\x{201E}])(?=\s*$)</string> |
| 6397 | + <string>\G@["\x{201C}-\x{201E}]</string> |
| 6398 | + <key>beginCaptures</key> |
| 6399 | + <dict> |
| 6400 | + <key>0</key> |
| 6401 | + <dict> |
| 6402 | + <key>name</key> |
| 6403 | + <string>string.quoted.double.heredoc.powershell punctuation.definition.heredoc.begin.powershell</string> |
| 6404 | + </dict> |
| 6405 | + </dict> |
6392 | 6406 | <key>end</key>
|
6393 |
| - <string>^(?:["\x{201C}-\x{201E}])@</string> |
6394 |
| - <key>name</key> |
| 6407 | + <string>^(["\x{201C}-\x{201E}]@)|\G((?:\s*\S+)+)(?:(?!\n)\s)*$</string> |
| 6408 | + <key>endCaptures</key> |
| 6409 | + <dict> |
| 6410 | + <key>1</key> |
| 6411 | + <dict> |
| 6412 | + <key>name</key> |
| 6413 | + <string>string.quoted.double.heredoc.powershell punctuation.definition.heredoc.end.powershell</string> |
| 6414 | + </dict> |
| 6415 | + <key>2</key> |
| 6416 | + <dict> |
| 6417 | + <key>patterns</key> |
| 6418 | + <array> |
| 6419 | + <dict> |
| 6420 | + <key>match</key> |
| 6421 | + <string>\S+</string> |
| 6422 | + <key>name</key> |
| 6423 | + <string>invalid.source.powershell</string> |
| 6424 | + </dict> |
| 6425 | + </array> |
| 6426 | + </dict> |
| 6427 | + </dict> |
| 6428 | + <key>contentName</key> |
6395 | 6429 | <string>string.quoted.double.heredoc.powershell</string>
|
6396 | 6430 | <key>patterns</key>
|
6397 | 6431 | <array>
|
|
6410 | 6444 | </array>
|
6411 | 6445 | </dict>
|
6412 | 6446 | <dict>
|
| 6447 | + <key>comment</key> |
| 6448 | + <string>single quoted here-strings</string> |
6413 | 6449 | <key>begin</key>
|
6414 |
| - <string>@['\x{2018}-\x{201B}](?=\s*$)</string> |
| 6450 | + <string>\G@['\x{2018}-\x{201B}]</string> |
| 6451 | + <key>beginCaptures</key> |
| 6452 | + <dict> |
| 6453 | + <key>0</key> |
| 6454 | + <dict> |
| 6455 | + <key>name</key> |
| 6456 | + <string>string.quoted.single.heredoc.powershell punctuation.definition.heredoc.begin.powershell</string> |
| 6457 | + </dict> |
| 6458 | + </dict> |
6415 | 6459 | <key>end</key>
|
6416 |
| - <string>^['\x{2018}-\x{201B}]@</string> |
6417 |
| - <key>name</key> |
| 6460 | + <string>^(['\x{2018}-\x{201B}]@)|\G((?:\s*\S+)+)(?:(?!\n)\s)*$</string> |
| 6461 | + <key>endCaptures</key> |
| 6462 | + <dict> |
| 6463 | + <key>1</key> |
| 6464 | + <dict> |
| 6465 | + <key>name</key> |
| 6466 | + <string>string.quoted.single.heredoc.powershell punctuation.definition.heredoc.end.powershell</string> |
| 6467 | + </dict> |
| 6468 | + <key>2</key> |
| 6469 | + <dict> |
| 6470 | + <key>patterns</key> |
| 6471 | + <array> |
| 6472 | + <dict> |
| 6473 | + <key>match</key> |
| 6474 | + <string>\S+</string> |
| 6475 | + <key>name</key> |
| 6476 | + <string>invalid.source.powershell</string> |
| 6477 | + </dict> |
| 6478 | + </array> |
| 6479 | + </dict> |
| 6480 | + </dict> |
| 6481 | + <key>contentName</key> |
6418 | 6482 | <string>string.quoted.single.heredoc.powershell</string>
|
6419 | 6483 | </dict>
|
6420 | 6484 | <dict>
|
| 6485 | + <key>comment</key> |
| 6486 | + <string>double quoted strings</string> |
6421 | 6487 | <key>begin</key>
|
6422 |
| - <string>(?:["\x{201C}-\x{201E}])</string> |
| 6488 | + <string>\G(?:["\x{201C}-\x{201E}])</string> |
6423 | 6489 | <key>beginCaptures</key>
|
6424 | 6490 | <dict>
|
6425 | 6491 | <key>0</key>
|
|
0 commit comments