Skip to content

Commit fa60a5a

Browse files
chore: update grammars and themes
1 parent 2e2727d commit fa60a5a

File tree

3 files changed

+118
-25
lines changed

3 files changed

+118
-25
lines changed

latest-shiki-commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e893ef826a79010fc0270697ba79ec75126b6ebe
1+
b5af8a11098273144599b09c5849b53e02ef53b6

vendor/phiki/phiki/resources/languages/purescript.json

Lines changed: 71 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
{
3939
"include": "#function_type_declaration"
4040
},
41+
{
42+
"include": "#function_type_declaration_arrow_first"
43+
},
4144
{
4245
"include": "#typed_hole"
4346
},
@@ -78,13 +81,13 @@
7881
"include": "#markup_newline"
7982
},
8083
{
81-
"include": "#double_colon_parens"
84+
"include": "#string_double_colon_parens"
8285
},
8386
{
84-
"include": "#double_colon_inlined"
87+
"include": "#double_colon_parens"
8588
},
8689
{
87-
"include": "#double_colon_orphan"
90+
"include": "#double_colon_inlined"
8891
},
8992
{
9093
"include": "#comments"
@@ -397,27 +400,25 @@
397400
]
398401
}
399402
},
400-
"match": "(::|∷)(.*)(?=<-|\"\"\")"
403+
"match": "(::|∷)(.*?)(?=<-| \"\"\")"
401404
}
402405
]
403406
},
404407
{
405408
"patterns": [
406409
{
407-
"captures": {
410+
"begin": "(::|∷)",
411+
"beginCaptures": {
408412
"1": {
409413
"name": "keyword.other.double-colon.purescript"
410-
},
411-
"2": {
412-
"name": "meta.type-signature.purescript",
413-
"patterns": [
414-
{
415-
"include": "#type_signature"
416-
}
417-
]
418414
}
419415
},
420-
"match": "(::|∷)(.*)"
416+
"end": "(?=^([\\s\\S]))",
417+
"patterns": [
418+
{
419+
"include": "#type_signature"
420+
}
421+
]
421422
}
422423
]
423424
}
@@ -464,7 +465,7 @@
464465
]
465466
}
466467
},
467-
"match": "\\((?<paren>(?:[^()]|\\(\\g<paren>\\))*)(::|∷)(?<paren2>(?:[^()]|\\(\\g<paren2>\\))*)\\)"
468+
"match": "\\((?<paren>(?:[^()]|\\(\\g<paren>\\))*)(::|∷)(?<paren2>(?:[^()}]|\\(\\g<paren2>\\))*)\\)"
468469
}
469470
]
470471
},
@@ -503,7 +504,7 @@
503504
"foreign_import_data": {
504505
"patterns": [
505506
{
506-
"begin": "^(\\s*)(foreign)\\s+(import)\\s+(data)(?:\\s+([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)\\s*(::|∷))?",
507+
"begin": "^(\\s*)(foreign)\\s+(import)\\s+(data)\\s(?:\\s+([\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)\\s*(::|∷))?",
507508
"beginCaptures": {
508509
"2": {
509510
"name": "keyword.other.purescript"
@@ -549,7 +550,7 @@
549550
"name": "punctuation.definition.entity.purescript"
550551
}
551552
},
552-
"match": "(`)(?:[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*(?:\\.[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)*\\.)?[_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*(`)",
553+
"match": "(`)(?:[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*(?:\\.[\\p{Lu}\\p{Lt}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*)*\\.)?[_\\p{Ll}]['_\\p{Ll}\\p{Lu}\\p{Lt}\\d]*.*(`)",
553554
"name": "keyword.operator.function.infix.purescript"
554555
}
555556
]
@@ -586,6 +587,35 @@
586587
}
587588
]
588589
},
590+
"function_type_declaration_arrow_first": {
591+
"patterns": [
592+
{
593+
"begin": "^(\\s*)\\s(::|∷)(?!.*<-)",
594+
"beginCaptures": {
595+
"2": {
596+
"name": "keyword.other.double-colon.purescript"
597+
}
598+
},
599+
"contentName": "meta.type-signature.purescript",
600+
"end": "^(?!\\1[\\t ]|[\\t ]*$)",
601+
"name": "meta.function.type-declaration.purescript",
602+
"patterns": [
603+
{
604+
"include": "#double_colon"
605+
},
606+
{
607+
"include": "#type_signature"
608+
},
609+
{
610+
"include": "#record_types"
611+
},
612+
{
613+
"include": "#row_types"
614+
}
615+
]
616+
}
617+
]
618+
},
589619
"generic_type": {
590620
"patterns": [
591621
{
@@ -621,7 +651,7 @@
621651
"include": "#data_ctor"
622652
},
623653
{
624-
"match": "\\d+",
654+
"match": " \\d+ ",
625655
"name": "constant.numeric.purescript"
626656
},
627657
{
@@ -931,6 +961,29 @@
931961
}
932962
]
933963
},
964+
"string_double_colon_parens": {
965+
"patterns": [
966+
{
967+
"captures": {
968+
"1": {
969+
"patterns": [
970+
{
971+
"include": "$self"
972+
}
973+
]
974+
},
975+
"2": {
976+
"patterns": [
977+
{
978+
"include": "$self"
979+
}
980+
]
981+
}
982+
},
983+
"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\\h+)|(\\^[@-_]))*(::|∷)([ -\\[\\]-~]|(\\\\(?: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\\h+)|(\\^[@-_]))*\")"
984+
}
985+
]
986+
},
934987
"string_double_quoted": {
935988
"patterns": [
936989
{

vendor/phiki/phiki/resources/languages/swift.json

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,10 @@
11251125
"end": "(?!\\G)(?=\\{|\\bwhere\\b|[;=])|$",
11261126
"name": "meta.function-result.swift",
11271127
"patterns": [
1128+
{
1129+
"match": "\\bsending\\b",
1130+
"name": "storage.modifier.swift"
1131+
},
11281132
{
11291133
"include": "#declarations-available-types"
11301134
}
@@ -1195,6 +1199,9 @@
11951199
},
11961200
"name": "meta.generic-argument-clause.swift",
11971201
"patterns": [
1202+
{
1203+
"include": "#literals-numeric"
1204+
},
11981205
{
11991206
"include": "#declarations-available-types"
12001207
}
@@ -1221,6 +1228,10 @@
12211228
{
12221229
"include": "#declarations-generic-where-clause"
12231230
},
1231+
{
1232+
"match": "\\blet\\b",
1233+
"name": "keyword.other.declaration-specifier.swift"
1234+
},
12241235
{
12251236
"match": "\\beach\\b",
12261237
"name": "keyword.control.loop.swift"
@@ -1435,6 +1446,9 @@
14351446
"begin": "\\G",
14361447
"end": "(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)",
14371448
"patterns": [
1449+
{
1450+
"include": "#attributes"
1451+
},
14381452
{
14391453
"include": "#comments"
14401454
},
@@ -1466,6 +1480,9 @@
14661480
"end": "(?!\\G)(?!/[*/])|(?=[,={}]|(?!\\G)\\bwhere\\b)",
14671481
"name": "meta.inheritance-list.more-types",
14681482
"patterns": [
1483+
{
1484+
"include": "#attributes"
1485+
},
14691486
{
14701487
"include": "#comments"
14711488
},
@@ -1698,6 +1715,10 @@
16981715
"begin": ":\\s*(?!\\s)",
16991716
"end": "(?=[),])",
17001717
"patterns": [
1718+
{
1719+
"match": "\\bsending\\b",
1720+
"name": "storage.modifier.swift"
1721+
},
17011722
{
17021723
"include": "#declarations-available-types"
17031724
},
@@ -2748,7 +2769,7 @@
27482769
"name": "keyword.control.branch.swift"
27492770
},
27502771
{
2751-
"match": "(?<!\\.)\\b(?:continue|break|fallthrough|return)\\b",
2772+
"match": "(?<!\\.)\\b(?:continue|break|fallthrough|return|yield)\\b",
27522773
"name": "keyword.control.transfer.swift"
27532774
},
27542775
{
@@ -2828,7 +2849,7 @@
28282849
"name": "storage.modifier.swift"
28292850
},
28302851
{
2831-
"match": "\\binit[!?]|\\binit\\b|(?<!\\.)\\b(?:func|deinit|subscript|didSet|get|set|willSet)\\b",
2852+
"match": "\\binit[!?]|\\binit\\b|(?<!\\.)\\b(?:func|deinit|subscript|didSet|get|set|willSet|yielding\\s+borrow|yielding\\s+mutate)\\b",
28322853
"name": "storage.type.function.swift"
28332854
},
28342855
{
@@ -3014,15 +3035,34 @@
30143035
"1": {
30153036
"name": "punctuation.definition.string.begin.regexp.swift"
30163037
},
3017-
"8": {
3038+
"3": {
3039+
"name": "punctuation.definition.string.end.regexp.swift"
3040+
}
3041+
},
3042+
"match": "(/)(?!\\s)(?!/)(?:\\\\\\s(?=/)|(?<guts>(?>(?:\\\\Q(?:(?!\\\\E)(?!/).)*+(?:\\\\E|(?=/))|\\\\.|\\(\\?#[^)]*\\)|\\(\\?(?>\\{(?:[^{].*?|\\{[^{].*?}|\\{\\{[^{].*?}}|\\{\\{\\{[^{].*?}}}|\\{\\{\\{\\{[^{].*?}}}}|\\{\\{\\{\\{\\{.+?}}}}})})(?:\\[(?!\\d)\\w+])?[<>X]?\\)|\\[(?:\\\\.|[^]\\[\\\\]|\\[(?:\\\\.|[^]\\[\\\\]|\\[(?:\\\\.|[^]\\[\\\\]|\\[(?:\\\\.|[^]\\[\\\\])+])+])+])+]|\\(\\g<guts>?+\\)|(?:(?!/)[^()\\[\\\\])+)+))?+(?<!\\s))(/)",
3043+
"name": "string.regexp.line.swift"
3044+
},
3045+
{
3046+
"captures": {
3047+
"0": {
3048+
"patterns": [
3049+
{
3050+
"include": "#literals-regular-expression-literal-regex-guts"
3051+
}
3052+
]
3053+
},
3054+
"1": {
3055+
"name": "punctuation.definition.string.begin.regexp.swift"
3056+
},
3057+
"4": {
30183058
"name": "punctuation.definition.string.end.regexp.swift"
30193059
},
3020-
"9": {
3060+
"5": {
30213061
"name": "invalid.illegal.returns-not-allowed.regexp"
30223062
}
30233063
},
3024-
"match": "(?x)\n(?!/\\s) # non-extended regex literals may not start with a space or tab\n(?!//) # disambiguation with line comments (redundant since comment rules occur earlier)\n(((\\#+)?)/) # (1) for captures, (2) for matching end, (3) for conditionals\n(\\\\\\s)? # (4) may start with an escaped space or tab\n(?<guts>\n (?> # no backtracking, avoids issues with negative lookbehind at end\n (?:\n \\\\Q\n (?:(?!\\\\E)(?!/\\2).)*+\n (?:\\\\E\n # A quoted sequence may not have a closing E, in which case it extends to the end of the regex\n | (?(3)|(?<!\\s))(?=/\\2)\n )\n | \\\\.\n | \\(\\?\\#[^)]*\\)\n | \\(\\?\n # InterpolatedCallout\n (?>(\\{(?:\\g<-1>|(?!{).*?)\\}))\n (?:\\[(?!\\d)\\w+\\])?\n [X<>]?\n \\)\n | (?<class>\\[ (?:\\\\. | [^\\[\\]] | \\g<class>)+ \\])\n | \\(\\g<guts>?+\\)\n | (?:(?!/\\2)[^()\\[\\\\])+ # any character (until end)\n )+\n )\n)?+\n# may end with a space only if it is an extended literal or contains only a single escaped space\n(?(3)|(?(5)(?<!\\s)))\n(/\\2) # (12)\n| \\#+/.+(\\n)",
3025-
"name": "string.regexp.line.swift"
3064+
"match": "((#+)/)(?<guts>(?>(?:\\\\Q(?:(?!\\\\E)(?!/\\2).)*+(?:\\\\E|(?=/\\2))|\\\\.|\\(\\?#[^)]*\\)|\\(\\?(?>\\{(?:[^{].*?|\\{[^{].*?}|\\{\\{[^{].*?}}|\\{\\{\\{[^{].*?}}}|\\{\\{\\{\\{[^{].*?}}}}|\\{\\{\\{\\{\\{.+?}}}}})})(?:\\[(?!\\d)\\w+])?[<>X]?\\)|\\[(?:\\\\.|[^]\\[\\\\]|\\[(?:\\\\.|[^]\\[\\\\]|\\[(?:\\\\.|[^]\\[\\\\]|\\[(?:\\\\.|[^]\\[\\\\])+])+])+])+]|\\(\\g<guts>?+\\)|(?:(?!/\\2)[^()\\[\\\\])+)+))?+(/\\2)|#+/.+(\\n)",
3065+
"name": "string.regexp.line.extended.swift"
30263066
}
30273067
]
30283068
},

0 commit comments

Comments
 (0)