-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
source.textgrid.js
51 lines (49 loc) · 1.43 KB
/
source.textgrid.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is developed at
// <https://github.com/orhunulusahin/praatvscode>
// and licensed `mit`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
extensions: ['.textgrid'],
names: ['textgrid'],
patterns: [
{
match:
'((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)',
name: 'constant.numeric.textgrid'
},
{
begin: '"',
beginCaptures: {
0: {name: 'punctuation.definition.string.begin.textgrid'}
},
contentName: 'meta.string-contents.quoted.double.textgrid',
end: '"',
endCaptures: {0: {name: 'punctuation.definition.string.end.textgrid'}},
name: 'string.quoted.double.textgrid'
},
{
match: '(x(min|max)|class|name|text|size)',
name: 'constant.language.textgrid'
},
{match: '(intervals|item)', name: 'entity.name.type.module.textgrid'},
{
match: '(File type|Object class|\\<exists\\>)',
name: 'keyword.control.language.textgrid'
},
{match: '=', name: 'keyword.operator.key.textgrid'},
{
captures: {
0: {name: 'constant.language.textgrid'},
1: {name: 'entity.name.type.module.textgrid'}
},
match: 'tiers(\\?)'
}
],
scopeName: 'source.textgrid'
}
export default grammar