|
55 | 55 | <key>0</key>
|
56 | 56 | <dict>
|
57 | 57 | <key>name</key>
|
58 |
| - <string>keyword.other.class.powershell</string> |
| 58 | + <string>keyword.declaration.class.powershell</string> |
59 | 59 | </dict>
|
60 | 60 | </dict>
|
61 | 61 | <key>end</key>
|
|
398 | 398 | <key>1</key>
|
399 | 399 | <dict>
|
400 | 400 | <key>name</key>
|
401 |
| - <string>keyword.other.enum.powershell</string> |
| 401 | + <string>keyword.declaration.enum.powershell</string> |
402 | 402 | </dict>
|
403 | 403 | </dict>
|
404 | 404 | <key>end</key>
|
|
651 | 651 | <key>0</key>
|
652 | 652 | <dict>
|
653 | 653 | <key>name</key>
|
654 |
| - <string>keyword.other.$0.powershell</string> |
| 654 | + <string>keyword.declaration.$0.powershell</string> |
655 | 655 | </dict>
|
656 | 656 | </dict>
|
657 | 657 | <key>end</key>
|
|
2617 | 2617 | <key>comment</key>
|
2618 | 2618 | <string>Next token needs to be an operand for the operator, not the actual command, but an expression or unquoted expandable string that describes the command's name.</string>
|
2619 | 2619 | <key>begin</key>
|
2620 |
| - <string>\G(?![,;&|)}<>])</string> |
| 2620 | + <string>\G(?![,;&|)}<>])|\G(?=<|[1-6]>&[12]|\*>&1|[1-6*]?>>?)</string> |
2621 | 2621 | <key>end</key>
|
2622 | 2622 | <string>(?=.|$)</string>
|
2623 | 2623 | <key>applyEndPatternLast</key>
|
|
2628 | 2628 | <key>include</key>
|
2629 | 2629 | <string>#advanceToToken</string>
|
2630 | 2630 | </dict>
|
| 2631 | + <dict> |
| 2632 | + <key>comment</key> |
| 2633 | + <string>at the begining of a command name, `<`, `>` or `>>` are the entire command name.</string> |
| 2634 | + <key>match</key> |
| 2635 | + <string>(?:<|[1-6]>&[12]|\*>&1|[1-6*]?>>?)</string> |
| 2636 | + <key>name</key> |
| 2637 | + <string>entity.name.function.powershell</string> |
| 2638 | + </dict> |
2631 | 2639 | <dict>
|
2632 | 2640 | <key>begin</key>
|
2633 | 2641 | <string>(?<=[\s>]|\G|^)(?![\s#,;&|)}<>]|<#|$)</string>
|
|
2666 | 2674 | <key>comment</key>
|
2667 | 2675 | <string>could be a numeric constant or a limited list of unary operators, that we should switch to expression mode</string>
|
2668 | 2676 | <key>begin</key>
|
2669 |
| - <string>(?=[\d.,!+\x{2013}-\x{2015}-])</string> |
| 2677 | + <string>(?=[.,!+\x{2013}-\x{2015}-]|\d(?!>&[12]))</string> |
2670 | 2678 | <key>end</key>
|
2671 | 2679 | <string>(?=[\n;)}\]])</string>
|
2672 | 2680 | <key>patterns</key>
|
|
2807 | 2815 | <key>comment</key>
|
2808 | 2816 | <string>at the begining of a command name, `<`, `>` or `>>` are the entire command name.</string>
|
2809 | 2817 | <key>match</key>
|
2810 |
| - <string>\G(?:<|>>?)</string> |
| 2818 | + <string>\G(?:<|\*>&1|\*?>>?|[1-6]>&[12])</string> |
2811 | 2819 | <key>name</key>
|
2812 | 2820 | <string>entity.name.function.powershell</string>
|
2813 | 2821 | </dict>
|
|
2881 | 2889 | <key>comment</key>
|
2882 | 2890 | <string>could be variable reference, if it doesn't have member reference, its the start of an unquoted expandable string</string>
|
2883 | 2891 | <key>begin</key>
|
2884 |
| - <string>(?=\$(?!\())</string> |
| 2892 | + <string>(?=\$[{\w:$^?])</string> |
2885 | 2893 | <key>end</key>
|
2886 | 2894 | <string>(?=.|$)</string>
|
2887 | 2895 | <key>applyEndPatternLast</key>
|
|
2966 | 2974 | </dict>
|
2967 | 2975 | </dict>
|
2968 | 2976 | </dict>
|
| 2977 | + <dict> |
| 2978 | + <key>comment</key> |
| 2979 | + <string>splatting cannot have members and certain characters following, including no line comment</string> |
| 2980 | + <key>match</key> |
| 2981 | + <string>@(?![$^?:\w])</string> |
| 2982 | + <key>name</key> |
| 2983 | + <string>invalid.splat.powershell</string> |
| 2984 | + </dict> |
2969 | 2985 | <dict>
|
2970 | 2986 | <key>include</key>
|
2971 | 2987 | <string>#unquotedArgument</string>
|
|
3021 | 3037 | <key>1</key>
|
3022 | 3038 | <dict>
|
3023 | 3039 | <key>name</key>
|
3024 |
| - <string>keyword.control.powershell</string> |
| 3040 | + <string>keyword.control.verbatim-argument.powershell</string> |
3025 | 3041 | </dict>
|
3026 | 3042 | </dict>
|
3027 | 3043 | <key>end</key>
|
|
3032 | 3048 | <key>match</key>
|
3033 | 3049 | <string>[^"\x{201C}-\x{201E}]+?</string>
|
3034 | 3050 | <key>name</key>
|
3035 |
| - <string>string.unquoted.powershell</string> |
| 3051 | + <string>string.unquoted.verbatim-argument.powershell</string> |
3036 | 3052 | </dict>
|
3037 | 3053 | <dict>
|
3038 | 3054 | <key>begin</key>
|
|
3143 | 3159 | <key>include</key>
|
3144 | 3160 | <string>#redirection</string>
|
3145 | 3161 | </dict>
|
3146 |
| - <dict> |
3147 |
| - <key>include</key> |
3148 |
| - <string>#type</string> |
3149 |
| - </dict> |
3150 | 3162 | <dict>
|
3151 | 3163 | <key>comment</key>
|
3152 | 3164 | <string>normally operands win matches first, but numeric constant and operators share common first characters, and their matching needs to be alternated such that after any operand matches, a check for operators should occur before a numeric value is checked for again. Operators needs to have first priority of a match after a numeric constant.</string>
|
|
3187 | 3199 | <key>include</key>
|
3188 | 3200 | <string>#operators_preUnary</string>
|
3189 | 3201 | </dict>
|
| 3202 | + <dict> |
| 3203 | + <key>include</key> |
| 3204 | + <string>#type</string> |
| 3205 | + </dict> |
3190 | 3206 | <dict>
|
3191 | 3207 | <key>include</key>
|
3192 | 3208 | <string>#variable</string>
|
|
4450 | 4466 | <key>3</key>
|
4451 | 4467 | <dict>
|
4452 | 4468 | <key>name</key>
|
4453 |
| - <string>storage.modifier.long.powershell</string> |
| 4469 | + <string>storage.modifier.powershell</string> |
4454 | 4470 | </dict>
|
4455 | 4471 | <key>4</key>
|
4456 | 4472 | <dict>
|
|
4459 | 4475 | </dict>
|
4460 | 4476 | </dict>
|
4461 | 4477 | <key>begin</key>
|
4462 |
| - <string>([+\x{2013}-\x{2015}-]?(?:\d+(?i:(?:\.\d*)?((?:e[+\x{2013}-\x{2015}-]?\d+)?([lsy]|u[lsy]?))|(?!\.(?!\.)))|(?:\.\d+)\g<2>))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
| 4478 | + <string>([+\x{2013}-\x{2015}-]?(?:\d+(?i:(?:\.\d*)?((?:e[+\x{2013}-\x{2015}-]?\d+)?([lsyn]|u[lsy]?))|(?!\.(?!\.)))|(?:\.\d+)\g<2>))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
4463 | 4479 | <key>end</key>
|
4464 | 4480 | <string>(?=.|$)</string>
|
4465 | 4481 | <key>applyEndPatternLast</key>
|
|
4483 | 4499 | <key>2</key>
|
4484 | 4500 | <dict>
|
4485 | 4501 | <key>name</key>
|
4486 |
| - <string>storage.modifier.long.powershell</string> |
| 4502 | + <string>storage.modifier.powershell</string> |
4487 | 4503 | </dict>
|
4488 | 4504 | <key>3</key>
|
4489 | 4505 | <dict>
|
|
4492 | 4508 | </dict>
|
4493 | 4509 | </dict>
|
4494 | 4510 | <key>begin</key>
|
4495 |
| - <string>([+\x{2013}-\x{2015}-]?0(?i:x\h+(u?[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
| 4511 | + <string>([+\x{2013}-\x{2015}-]?0(?i:x\h+(n|u?[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
4496 | 4512 | <key>end</key>
|
4497 | 4513 | <string>(?=.|$)</string>
|
4498 | 4514 | <key>applyEndPatternLast</key>
|
|
4544 | 4560 | <key>name</key>
|
4545 | 4561 | <string>invalid.numeric-constant.powershell</string>
|
4546 | 4562 | <key>match</key>
|
4547 |
| - <string>([\x{2013}-\x{2015}-]\.(?i:(?:e[+\x{2013}-\x{2015}-]?\d+)?(?:[dlsy]|u[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
| 4563 | + <string>([\x{2013}-\x{2015}-]\.(?i:(?:e[+\x{2013}-\x{2015}-]?\d+)?(?:[dlsyn]|u[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
4548 | 4564 | </dict>
|
4549 | 4565 | <dict>
|
4550 | 4566 | <key>captures</key>
|
|
4555 | 4571 | <string>constant.numeric.binary.powershell</string>
|
4556 | 4572 | </dict>
|
4557 | 4573 | <key>2</key>
|
| 4574 | + <dict> |
| 4575 | + <key>name</key> |
| 4576 | + <string>storage.modifier.powershell</string> |
| 4577 | + </dict> |
| 4578 | + <key>3</key> |
4558 | 4579 | <dict>
|
4559 | 4580 | <key>name</key>
|
4560 | 4581 | <string>constant.language.powershell</string>
|
4561 | 4582 | </dict>
|
4562 | 4583 | </dict>
|
4563 |
| - <key>comment</key> |
4564 |
| - <string>([+\x{2013}-\x{2015}-]?0(?i:b[01_]+l?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
| 4584 | + <key>match</key> |
| 4585 | + <string>([+\x{2013}-\x{2015}-]?0(?i:b[01]+([dn]|u?[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}#\]<>.!+%*/=\x{2013}-\x{2015}-])</string> |
4565 | 4586 | </dict>
|
4566 | 4587 | </array>
|
4567 | 4588 | <key>repository</key>
|
|
4636 | 4657 | <key>3</key>
|
4637 | 4658 | <dict>
|
4638 | 4659 | <key>name</key>
|
4639 |
| - <string>storage.modifier.long.powershell</string> |
| 4660 | + <string>storage.modifier.powershell</string> |
4640 | 4661 | </dict>
|
4641 | 4662 | <key>4</key>
|
4642 | 4663 | <dict>
|
|
4645 | 4666 | </dict>
|
4646 | 4667 | </dict>
|
4647 | 4668 | <key>match</key>
|
4648 |
| - <string>((?:\d+(?i:(?:\.\d*)?((?:e[+\x{2013}-\x{2015}-]?\d+)?([lsy]|u[lsy]?))|(?!\.(?!\.)))|(?:\.\d+)\g<2>))((?i:[kmgtp]b))?(?=[\s{(,;&|)}])</string> |
| 4669 | + <string>((?:\d+(?i:(?:\.\d*)?((?:e[+\x{2013}-\x{2015}-]?\d+)?([lsyn]|u[lsy]?))|(?!\.(?!\.)))|(?:\.\d+)\g<2>))((?i:[kmgtp]b))?(?=[\s{(,;&|)}])</string> |
4649 | 4670 | </dict>
|
4650 | 4671 | <dict>
|
4651 | 4672 | <key>captures</key>
|
|
4658 | 4679 | <key>2</key>
|
4659 | 4680 | <dict>
|
4660 | 4681 | <key>name</key>
|
4661 |
| - <string>storage.modifier.long.powershell</string> |
| 4682 | + <string>storage.modifier.powershell</string> |
4662 | 4683 | </dict>
|
4663 | 4684 | <key>3</key>
|
4664 | 4685 | <dict>
|
|
4667 | 4688 | </dict>
|
4668 | 4689 | </dict>
|
4669 | 4690 | <key>match</key>
|
4670 |
| - <string>(0(?i:x\h+(u?[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}])</string> |
| 4691 | + <string>(0(?i:x\h+(n|u?[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}])</string> |
4671 | 4692 | </dict>
|
4672 | 4693 | <dict>
|
4673 | 4694 | <key>captures</key>
|
|
4700 | 4721 | <string>constant.numeric.binary.powershell</string>
|
4701 | 4722 | </dict>
|
4702 | 4723 | <key>2</key>
|
| 4724 | + <dict> |
| 4725 | + <key>name</key> |
| 4726 | + <string>storage.modifier.powershell</string> |
| 4727 | + </dict> |
| 4728 | + <key>3</key> |
4703 | 4729 | <dict>
|
4704 | 4730 | <key>name</key>
|
4705 | 4731 | <string>constant.language.powershell</string>
|
4706 | 4732 | </dict>
|
4707 | 4733 | </dict>
|
4708 |
| - <key>comment</key> |
4709 |
| - <string>(0(?i:b[01_]+l?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}])</string> |
| 4734 | + <key>match</key> |
| 4735 | + <string>(0(?i:b[01]+(n|u?[lsy]?)?))((?i:[kmgtp]b))?(?=[\s{(,;&|)}])</string> |
4710 | 4736 | </dict>
|
4711 | 4737 | </array>
|
4712 | 4738 | </dict>
|
|
6324 | 6350 | <string>entity.name.variable.property.powershell</string>
|
6325 | 6351 | </dict>
|
6326 | 6352 | <dict>
|
6327 |
| - <key>include</key> |
| 6353 | + <key>comment</key> |
6328 | 6354 | <string>#type</string>
|
6329 | 6355 | </dict>
|
6330 | 6356 | <dict>
|
6331 |
| - <key>include</key> |
| 6357 | + <key>comment</key> |
6332 | 6358 | <string>#variable</string>
|
6333 | 6359 | </dict>
|
6334 | 6360 | <dict>
|
6335 |
| - <key>include</key> |
| 6361 | + <key>comment</key> |
6336 | 6362 | <string>#quotedStrings_Members</string>
|
6337 | 6363 | </dict>
|
| 6364 | + <dict> |
| 6365 | + <key>include</key> |
| 6366 | + <string>#operand</string> |
| 6367 | + </dict> |
6338 | 6368 | <dict>
|
6339 | 6369 | <key>begin</key>
|
6340 | 6370 | <string>(=)\n?</string>
|
|
7304 | 7334 | </dict>
|
7305 | 7335 | <dict>
|
7306 | 7336 | <key>match</key>
|
7307 |
| - <string><(?!#)</string> |
| 7337 | + <string><(?!#)|[1-6]>&2</string> |
7308 | 7338 | <key>name</key>
|
7309 | 7339 | <string>invalid.reserved.redirection.powershell</string>
|
7310 | 7340 | </dict>
|
|
0 commit comments