|
569 | 569 | <key>contentName</key> |
570 | 570 | <string>string.regexp.classic.ruby</string> |
571 | 571 | <key>end</key> |
572 | | - <string>((/[eimnosux]*))\s*(?:(\b(?:if|unless)\b(?![?!]))|(\b(?:while|until)\b(?![?!])))?</string> |
| 572 | + <string>((/[eimnosux]*))\s*(?:((\b(?:if|unless)\b(?![?!])))|((\b(?:while|until)\b(?![?!]))))?</string> |
573 | 573 | <key>endCaptures</key> |
574 | 574 | <dict> |
575 | 575 | <key>1</key> |
|
585 | 585 | <key>3</key> |
586 | 586 | <dict> |
587 | 587 | <key>name</key> |
588 | | - <string>meta.control.modifier keyword.control.if-unless.ruby</string> |
| 588 | + <string>meta.control.modifier</string> |
589 | 589 | </dict> |
590 | 590 | <key>4</key> |
591 | 591 | <dict> |
592 | 592 | <key>name</key> |
593 | | - <string>meta.control.modifier keyword.control.while-until.ruby</string> |
| 593 | + <string>keyword.control.if-unless.ruby</string> |
| 594 | + </dict> |
| 595 | + <key>5</key> |
| 596 | + <dict> |
| 597 | + <key>name</key> |
| 598 | + <string>meta.control.modifier</string> |
| 599 | + </dict> |
| 600 | + <key>6</key> |
| 601 | + <dict> |
| 602 | + <key>name</key> |
| 603 | + <string>keyword.control.while-until.ruby</string> |
594 | 604 | </dict> |
595 | 605 | </dict> |
596 | 606 | <key>patterns</key> |
|
607 | 617 | <key>1</key> |
608 | 618 | <dict> |
609 | 619 | <key>name</key> |
610 | | - <string>meta.control.modifier keyword.control.if-unless.ruby</string> |
| 620 | + <string>meta.control.modifier</string> |
| 621 | + </dict> |
| 622 | + <key>2</key> |
| 623 | + <dict> |
| 624 | + <key>name</key> |
| 625 | + <string>keyword.control.if-unless.ruby</string> |
611 | 626 | </dict> |
612 | 627 | </dict> |
613 | 628 | <key>match</key> |
|
627 | 642 | \Win|^in| |
628 | 643 | \W!|^!| |
629 | 644 | \W\?|^\?) |
630 | | - \s*\b(if|unless)\b(?![?!]) |
| 645 | + \s*\b((if|unless))\b(?![?!]) |
631 | 646 | </string> |
632 | 647 | </dict> |
633 | 648 | <dict> |
634 | 649 | <key>begin</key> |
635 | 650 | <string>(?x) |
636 | 651 | (?<!::) |
637 | | - (?<=<|&|\||=|>|~|\^|[+\-*/%]|\.{2}|\.{3}|^|;|:| |
| 652 | + (?<=<|&|\||=|>|~|\^|[+\-*/%]|\.{2}|\.{3}|^|;|:|\[|\(|\{|,| |
638 | 653 | \Wif|^if| # \WX|^X is equivalent to \bX |
639 | 654 | \Wunless|^unless| # this is workaround for code editors which doesn't support onigomo |
640 | 655 | \Wcase|^case| # https://github.com/microsoft/vscode-textmate/issues/121#issuecomment-565689295 |
|
680 | 695 | </array> |
681 | 696 | </dict> |
682 | 697 | <dict> |
| 698 | + <key>captures</key> |
| 699 | + <dict> |
| 700 | + <key>1</key> |
| 701 | + <dict> |
| 702 | + <key>name</key> |
| 703 | + <string>meta.control.modifier</string> |
| 704 | + </dict> |
| 705 | + <key>2</key> |
| 706 | + <dict> |
| 707 | + <key>name</key> |
| 708 | + <string>keyword.control.while-until.ruby</string> |
| 709 | + </dict> |
| 710 | + </dict> |
683 | 711 | <key>match</key> |
684 | 712 | <string>(?x) |
685 | 713 | (?<=[}\])\w?!"'`]) |
|
697 | 725 | \Win|^in| |
698 | 726 | \W!|^!| |
699 | 727 | \W\?|^\?) |
700 | | - \s*\b(while|until)\b(?![?!]) |
| 728 | + \s*\b((while|until))\b(?![?!]) |
701 | 729 | </string> |
702 | | - <key>name</key> |
703 | | - <string>meta.control.modifier keyword.control.while-until.ruby</string> |
704 | 730 | </dict> |
705 | 731 | <dict> |
706 | 732 | <key>begin</key> |
707 | 733 | <string>(?x) |
708 | 734 | (?<!::) |
709 | | - (?<=<|&|\||=|>|~|\^|[+\-*/%]|\.{2}|\.{3}|^|;|:| |
| 735 | + (?<=<|&|\||=|>|~|\^|[+\-*/%]|\.{2}|\.{3}|^|;|:|\[|\(|\{|,| |
710 | 736 | \Wif|^if| # \WX|^X is equivalent to \bX |
711 | 737 | \Wunless|^unless| # this is workaround for code editors which doesn't support onigomo |
712 | 738 | \Wcase|^case| # https://github.com/microsoft/vscode-textmate/issues/121#issuecomment-565689295 |
|
0 commit comments