Skip to content

Commit 9055f29

Browse files
committed
Regenerate for linguist@9.6.0
(also updates for `linguist@9.5.0`) * add `source.baml`, `source.baml-jinja`, `source.flatbuffers`, `source.gtkrc`, `source.il`, `source.liquidsoap`, `source.metta`, `source.opy`, `source.powerquery`, `source.quint`, `source.redscript`, `source.spicedb`, `source.vento` * update a bunch of grammars For more info, see: * [`github-linguist/linguist@9.6.0`](https://github.com/github-linguist/linguist/releases/tag/v9.6.0)
1 parent 228ed1a commit 9055f29

90 files changed

Lines changed: 11967 additions & 3684 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lang/etc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@ const grammar = {
8181
end: '$',
8282
name: 'comment.line.double-slash'
8383
},
84+
commentStart: {patterns: [{include: '#commentStartHash'}]},
85+
commentStartHash: {
86+
begin: '^(?=#)',
87+
end: '(?!\\G)',
88+
patterns: [{include: '#commentHash'}]
89+
},
90+
commentStartSemi: {
91+
begin: '^(?=;)',
92+
end: '(?!\\G)',
93+
patterns: [{include: '#commentSemi'}]
94+
},
95+
commentStartSlash: {
96+
begin: '^(?=//)',
97+
end: '(?!\\G)',
98+
patterns: [{include: '#commentSlash'}]
99+
},
84100
dash: {match: '-', name: 'punctuation.delimiter.separator.dash.hyphen'},
85101
dot: {
86102
match: '\\.',

lang/source.4dm.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// This is a TextMate grammar distributed by `starry-night`.
2-
// This grammar is licensed `mit`.
2+
// This grammar is developed at
3+
// <https://github.com/4d/language-4d>
4+
// and licensed `mit`.
35
// See <https://github.com/wooorm/starry-night> for more info.
46
/**
57
* @import {Grammar} from '@wooorm/starry-night'
@@ -170,7 +172,7 @@ const grammar = {
170172
{
171173
begin: '/\\*\\*',
172174
beginCaptures: {0: {name: 'punctuation.definition.comment.begin.4d'}},
173-
end: '\\*\\*/',
175+
end: '\\*/',
174176
endCaptures: {0: {name: 'punctuation.definition.comment.end.4d'}},
175177
name: 'comment.block.4d'
176178
},
@@ -221,6 +223,7 @@ const grammar = {
221223
},
222224
'function-call-innards': {
223225
patterns: [
226+
{include: '#strings'},
224227
{include: '#comments'},
225228
{include: '#storage_types'},
226229
{include: '#operators'},

lang/source.abl.js

Lines changed: 391 additions & 294 deletions
Large diffs are not rendered by default.

lang/source.apex.js

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ const grammar = {
655655
{include: '#boolean-literal'},
656656
{include: '#null-literal'},
657657
{include: '#numeric-literal'},
658+
{include: '#multiline-string-literal'},
658659
{include: '#string-literal'}
659660
]
660661
},
@@ -784,6 +785,14 @@ const grammar = {
784785
match: '@?[_[:alpha:]][_[:alnum:]]*',
785786
name: 'entity.name.function.apex'
786787
},
788+
'multiline-string-literal': {
789+
begin: "'''(?=$)",
790+
beginCaptures: {0: {name: 'punctuation.definition.string.begin.apex'}},
791+
end: "'''",
792+
endCaptures: {0: {name: 'punctuation.definition.string.end.apex'}},
793+
name: 'string.quoted.single.apex string.quoted.single.multiline.apex',
794+
patterns: [{include: '#string-character-escape'}]
795+
},
787796
'named-argument': {
788797
begin: '(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)',
789798
beginCaptures: {
@@ -1132,15 +1141,35 @@ const grammar = {
11321141
name: 'constant.character.escape.apex'
11331142
},
11341143
'string-literal': {
1135-
begin: "'",
1144+
begin: "\\'(?!'')",
11361145
beginCaptures: {0: {name: 'punctuation.definition.string.begin.apex'}},
11371146
end: "(\\')|((?:[^\\\\\\n])$)",
11381147
endCaptures: {
11391148
1: {name: 'punctuation.definition.string.end.apex'},
11401149
2: {name: 'invalid.illegal.newline.apex'}
11411150
},
11421151
name: 'string.quoted.single.apex',
1143-
patterns: [{include: '#string-character-escape'}]
1152+
patterns: [
1153+
{include: '#string-character-escape'},
1154+
{include: '#string-template-expression'}
1155+
]
1156+
},
1157+
'string-template-expression': {
1158+
begin: '(?<!\\\\)\\$\\{',
1159+
beginCaptures: {
1160+
0: {name: 'punctuation.definition.template-expression.begin.apex'}
1161+
},
1162+
end: '\\}',
1163+
endCaptures: {
1164+
0: {name: 'punctuation.definition.template-expression.end.apex'}
1165+
},
1166+
name: 'meta.template-expression.apex',
1167+
patterns: [
1168+
{
1169+
match: '\\G@?[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*',
1170+
name: 'variable.other.readwrite.apex'
1171+
}
1172+
]
11441173
},
11451174
'support-arguments': {
11461175
begin: '<',
@@ -1529,9 +1558,19 @@ const grammar = {
15291558
begin: "(when)\\b\\s*('[^'\\n]*')(\\s*(,)\\s*('[^'\\n]*'))*\\s*",
15301559
beginCaptures: {
15311560
1: {name: 'keyword.control.switch.when.apex'},
1532-
2: {patterns: [{include: '#string-literal'}]},
1561+
2: {
1562+
patterns: [
1563+
{include: '#multiline-string-literal'},
1564+
{include: '#string-literal'}
1565+
]
1566+
},
15331567
4: {patterns: [{include: '#punctuation-comma'}]},
1534-
5: {patterns: [{include: '#string-literal'}]}
1568+
5: {
1569+
patterns: [
1570+
{include: '#multiline-string-literal'},
1571+
{include: '#string-literal'}
1572+
]
1573+
}
15351574
},
15361575
end: '(?=\\})|(?=when\\b)',
15371576
patterns: [{include: '#block'}, {include: '#expression'}]

lang/source.applescript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/** @type {Grammar} */
99
const grammar = {
1010
extensions: ['.applescript', '.scpt'],
11-
names: ['applescript', 'osascript'],
11+
names: ['applescript', 'apples', 'osascript'],
1212
patterns: [{include: '#blocks'}, {include: '#inline'}],
1313
repository: {
1414
'attributes.considering-ignoring': {

lang/source.astro.js

Lines changed: 59 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a TextMate grammar distributed by `starry-night`.
22
// This grammar is developed at
3-
// <https://github.com/withastro/language-tools>
3+
// <https://github.com/withastro/astro>
44
// and licensed `mit`.
55
// See <https://github.com/wooorm/starry-night> for more info.
66
/**
@@ -12,19 +12,26 @@ const grammar = {
1212
dependencies: ['source.js', 'source.ts', 'source.tsx'],
1313
extensions: ['.astro'],
1414
injections: {
15-
'L:(meta.script.astro) (meta.lang.js | meta.lang.javascript | meta.lang.partytown | meta.lang.node) - (meta source)':
15+
'L:(meta.script.astro) (meta.lang.js | meta.lang.javascript | meta.lang.partytown | meta.lang.node) - (meta.embedded.block source)':
1616
{
1717
patterns: [
1818
{
19-
begin: '(?<=>)(?!</)',
19+
begin: '(?<=>)(?=[^\\n]+</script[\\s>])',
2020
contentName: 'source.js',
21-
end: '(?=</)',
21+
end: '(?=</script[\\s>])',
2222
name: 'meta.embedded.block.astro',
2323
patterns: [{include: 'source.js'}]
24+
},
25+
{
26+
begin: '(?<=>)(?!</)',
27+
contentName: 'source.js',
28+
name: 'meta.embedded.block.astro',
29+
patterns: [{include: 'source.js'}],
30+
while: '^(?!\\s*</script[\\s>])'
2431
}
2532
]
2633
},
27-
'L:(meta.script.astro) (meta.lang.json) - (meta source)': {
34+
'L:(meta.script.astro) (meta.lang.json) - (meta.embedded.block source)': {
2835
patterns: [
2936
{
3037
begin: '(?<=>)(?!</)',
@@ -35,30 +42,47 @@ const grammar = {
3542
}
3643
]
3744
},
38-
'L:(meta.script.astro) (meta.lang.ts | meta.lang.typescript) - (meta source)':
45+
'L:(meta.script.astro) (meta.lang.ts | meta.lang.typescript) - (meta.embedded.block source)':
3946
{
4047
patterns: [
4148
{
42-
begin: '(?<=>)(?!</)',
49+
begin: '(?<=>)(?=[^\\n]+</script[\\s>])',
4350
contentName: 'source.ts',
44-
end: '(?=</)',
51+
end: '(?=</script[\\s>])',
4552
name: 'meta.embedded.block.astro',
4653
patterns: [{include: 'source.ts'}]
54+
},
55+
{
56+
begin: '(?<=>)(?!</)',
57+
contentName: 'source.ts',
58+
name: 'meta.embedded.block.astro',
59+
patterns: [{include: 'source.ts'}],
60+
while: '^(?!\\s*</script[\\s>])'
4761
}
4862
]
4963
},
50-
'L:meta.script.astro - meta.lang - (meta source)': {
64+
'L:meta.embedded.expression.astro - meta.embedded.block': {
65+
patterns: [{include: '#tags-lang'}]
66+
},
67+
'L:meta.script.astro - meta.lang - (meta.embedded.block source)': {
5168
patterns: [
5269
{
53-
begin: '(?<=>)(?!</)',
70+
begin: '(?<=>)(?=[^\\n]+</script[\\s>])',
5471
contentName: 'source.js',
55-
end: '(?=</)',
72+
end: '(?=</script[\\s>])',
5673
name: 'meta.embedded.block.astro',
5774
patterns: [{include: 'source.js'}]
75+
},
76+
{
77+
begin: '(?<=>)(?!</)',
78+
contentName: 'source.js',
79+
name: 'meta.embedded.block.astro',
80+
patterns: [{include: 'source.js'}],
81+
while: '^(?!\\s*</script[\\s>])'
5882
}
5983
]
6084
},
61-
'L:meta.style.astro - meta.lang - (meta source)': {
85+
'L:meta.style.astro - meta.lang - (meta.embedded.block source)': {
6286
patterns: [
6387
{
6488
begin: '(?<=>)(?!</)',
@@ -69,7 +93,7 @@ const grammar = {
6993
}
7094
]
7195
},
72-
'L:meta.style.astro meta.lang.css - (meta source)': {
96+
'L:meta.style.astro meta.lang.css - (meta.embedded.block source)': {
7397
patterns: [
7498
{
7599
begin: '(?<=>)(?!</)',
@@ -80,7 +104,7 @@ const grammar = {
80104
}
81105
]
82106
},
83-
'L:meta.style.astro meta.lang.less - (meta source)': {
107+
'L:meta.style.astro meta.lang.less - (meta.embedded.block source)': {
84108
patterns: [
85109
{
86110
begin: '(?<=>)(?!</)',
@@ -91,7 +115,7 @@ const grammar = {
91115
}
92116
]
93117
},
94-
'L:meta.style.astro meta.lang.postcss - (meta source)': {
118+
'L:meta.style.astro meta.lang.postcss - (meta.embedded.block source)': {
95119
patterns: [
96120
{
97121
begin: '(?<=>)(?!</)',
@@ -102,7 +126,7 @@ const grammar = {
102126
}
103127
]
104128
},
105-
'L:meta.style.astro meta.lang.sass - (meta source)': {
129+
'L:meta.style.astro meta.lang.sass - (meta.embedded.block source)': {
106130
patterns: [
107131
{
108132
begin: '(?<=>)(?!</)',
@@ -113,7 +137,7 @@ const grammar = {
113137
}
114138
]
115139
},
116-
'L:meta.style.astro meta.lang.scss - (meta source)': {
140+
'L:meta.style.astro meta.lang.scss - (meta.embedded.block source)': {
117141
patterns: [
118142
{
119143
begin: '(?<=>)(?!</)',
@@ -124,7 +148,7 @@ const grammar = {
124148
}
125149
]
126150
},
127-
'L:meta.style.astro meta.lang.stylus - (meta source)': {
151+
'L:meta.style.astro meta.lang.stylus - (meta.embedded.block source)': {
128152
patterns: [
129153
{
130154
begin: '(?<=>)(?!</)',
@@ -356,10 +380,24 @@ const grammar = {
356380
frontmatter: {
357381
begin: '\\A(-{3})\\s*$',
358382
beginCaptures: {1: {name: 'comment'}},
359-
contentName: 'source.ts',
360383
end: '(^|\\G)(-{3})|\\.{3}\\s*$',
361384
endCaptures: {2: {name: 'comment'}},
362-
patterns: [{include: 'source.ts'}]
385+
patterns: [
386+
{
387+
begin: '(?<=\\n)(?=[^\\n]+^-{3})',
388+
contentName: 'source.ts',
389+
end: '(?=^-{3})',
390+
name: 'meta.embedded.block.astro',
391+
patterns: [{include: 'source.ts'}]
392+
},
393+
{
394+
begin: '(?<=\\n)',
395+
contentName: 'source.ts',
396+
name: 'meta.embedded.block.astro',
397+
patterns: [{include: 'source.ts'}],
398+
while: '^(?!\\s*-{3})'
399+
}
400+
]
363401
},
364402
interpolation: {
365403
patterns: [
@@ -431,7 +469,7 @@ const grammar = {
431469
patterns: [{include: '#tags-start-attributes'}]
432470
},
433471
'tags-lang': {
434-
begin: '<(script|style)',
472+
begin: '<(script|style)(?=\\s|/?>)',
435473
beginCaptures: {0: {patterns: [{include: '#tags-start-node'}]}},
436474
end: '</\\1\\s*>|/>',
437475
endCaptures: {0: {patterns: [{include: '#tags-end-node'}]}},

0 commit comments

Comments
 (0)