|
57 | 57 | { |
58 | 58 | 'include': '#function_type_declaration' |
59 | 59 | } |
| 60 | + { |
| 61 | + 'include': '#function_type_declaration_arrow_first' |
| 62 | + } |
60 | 63 | { |
61 | 64 | 'include': '#typed_hole' |
62 | 65 | } |
|
97 | 100 | 'include': '#markup_newline' |
98 | 101 | } |
99 | 102 | { |
100 | | - 'include': '#double_colon_parens' |
| 103 | + 'include': '#string_double_colon_parens' |
101 | 104 | } |
102 | 105 | { |
103 | | - 'include': '#double_colon_inlined' |
| 106 | + 'include': '#double_colon_parens' |
104 | 107 | } |
105 | 108 | { |
106 | | - 'include': '#double_colon_orphan' |
| 109 | + 'include': '#double_colon_inlined' |
107 | 110 | } |
108 | 111 | { |
109 | 112 | 'include': '#comments' |
|
155 | 158 | 'patterns': [ |
156 | 159 | { |
157 | 160 | 'name': 'keyword.operator.function.infix.purescript' |
158 | | - 'match': '(`)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*(`)' |
| 161 | + 'match': '(`)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*.*(`)' |
159 | 162 | 'captures': |
160 | 163 | '1': |
161 | 164 | 'name': 'punctuation.definition.entity.purescript' |
|
238 | 241 | 'patterns': [ |
239 | 242 | { |
240 | 243 | 'name': 'meta.foreign.data.purescript' |
241 | | - 'begin': '^(\\s*)(foreign)\\s+(import)\\s+(data)(?:\\s+([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*)\\s*((?:::|∷)))?' |
| 244 | + 'begin': '^(\\s*)(foreign)\\s+(import)\\s+(data)\\s(?:\\s+([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}\']*)\\s*((?:::|∷)))?' |
242 | 245 | 'end': '^(?!\\1[ \\t]|[ \\t]*$)' |
243 | 246 | 'contentName': 'meta.kind-signature.purescript' |
244 | 247 | 'beginCaptures': |
|
482 | 485 | } |
483 | 486 | { |
484 | 487 | 'name': 'constant.numeric.purescript' |
485 | | - 'match': '\\d+' |
| 488 | + 'match': ' \\d+ ' |
486 | 489 | } |
487 | 490 | { |
488 | 491 | 'match': '([\\p{S}\\p{P}&&[^(),;\\[\\]`{}_"\']]+)' |
|
582 | 585 | 'name': 'punctuation.definition.string.end.purescript' |
583 | 586 | } |
584 | 587 | ] |
| 588 | + 'string_double_colon_parens': |
| 589 | + 'patterns': [ |
| 590 | + { |
| 591 | + 'match': '\\((.*?)("(?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))*(::|∷)((?:[ -\\[\\]-~]|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_])))*")' |
| 592 | + 'captures': |
| 593 | + '1': |
| 594 | + 'patterns': [ |
| 595 | + { |
| 596 | + 'include': '$self' |
| 597 | + } |
| 598 | + ] |
| 599 | + '2': |
| 600 | + 'patterns': [ |
| 601 | + { |
| 602 | + 'include': '$self' |
| 603 | + } |
| 604 | + ] |
| 605 | + } |
| 606 | + ] |
585 | 607 | 'string_double_quoted': |
586 | 608 | 'patterns': [ |
587 | 609 | { |
|
634 | 656 | 'double_colon_parens': |
635 | 657 | 'patterns': [ |
636 | 658 | { |
637 | | - 'match': '\\((?<paren>(?:[^()]|\\(\\g<paren>\\))*)(::|∷)(?<paren2>(?:[^()]|\\(\\g<paren2>\\))*)\\)' |
| 659 | + 'match': '\\((?<paren>(?:[^()]|\\(\\g<paren>\\))*)(::|∷)(?<paren2>(?:[^()}]|\\(\\g<paren2>\\))*)\\)' |
638 | 660 | 'captures': |
639 | 661 | '1': |
640 | 662 | 'patterns': [ |
|
658 | 680 | { |
659 | 681 | 'patterns': [ |
660 | 682 | { |
661 | | - 'match': '((?:::|∷))(.*)(?=<-|""")' |
| 683 | + 'match': '((?:::|∷))(.*?)(?=<-| """)' |
662 | 684 | 'captures': |
663 | 685 | '1': |
664 | 686 | 'name': 'keyword.other.double-colon.purescript' |
|
675 | 697 | { |
676 | 698 | 'patterns': [ |
677 | 699 | { |
678 | | - 'match': '((?:::|∷))(.*)' |
679 | | - 'captures': |
| 700 | + 'begin': '((?:::|∷))' |
| 701 | + 'end': '(?=^(\\s|\\S))' |
| 702 | + 'beginCaptures': |
680 | 703 | '1': |
681 | 704 | 'name': 'keyword.other.double-colon.purescript' |
682 | | - '2': |
683 | | - 'name': 'meta.type-signature.purescript' |
684 | | - 'patterns': [ |
685 | | - { |
686 | | - 'include': '#type_signature' |
687 | | - } |
688 | | - ] |
| 705 | + 'patterns': [ |
| 706 | + { |
| 707 | + 'include': '#type_signature' |
| 708 | + } |
| 709 | + ] |
689 | 710 | } |
690 | 711 | ] |
691 | 712 | } |
|
857 | 878 | ] |
858 | 879 | } |
859 | 880 | ] |
| 881 | + 'function_type_declaration_arrow_first': |
| 882 | + 'patterns': [ |
| 883 | + { |
| 884 | + 'name': 'meta.function.type-declaration.purescript' |
| 885 | + 'begin': '^(\\s*)(?:\\s(::|∷)(?!.*<-))' |
| 886 | + 'end': '^(?!\\1[ \\t]|[ \\t]*$)' |
| 887 | + 'contentName': 'meta.type-signature.purescript' |
| 888 | + 'beginCaptures': |
| 889 | + '2': |
| 890 | + 'name': 'keyword.other.double-colon.purescript' |
| 891 | + 'patterns': [ |
| 892 | + { |
| 893 | + 'include': '#double_colon' |
| 894 | + } |
| 895 | + { |
| 896 | + 'include': '#type_signature' |
| 897 | + } |
| 898 | + { |
| 899 | + 'include': '#record_types' |
| 900 | + } |
| 901 | + { |
| 902 | + 'include': '#row_types' |
| 903 | + } |
| 904 | + ] |
| 905 | + } |
| 906 | + ] |
860 | 907 | 'row_types': |
861 | 908 | 'patterns': [ |
862 | 909 | { |
|
0 commit comments