-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
source.generic-db.js
32 lines (31 loc) · 883 Bytes
/
source.generic-db.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
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is developed at
// <https://github.com/Alhadis/language-etc>
// and licensed `isc`.
// See <https://github.com/wooorm/starry-night> for more info.
/** @type {import('../lib/index.js').Grammar} */
const grammar = {
dependencies: ['etc'],
extensions: ['.tsv'],
names: ['tsv'],
patterns: [{include: '#main'}],
repository: {
field: {
match: '(?:[^#:\\s]|(?<=\\t|:)#)[^:\\t]*',
name: 'constant.other.field.generic-db'
},
main: {patterns: [{include: 'etc#comment'}, {include: '#record'}]},
record: {
begin: '^(?=\\s*[^#:\\s])',
end: '$',
name: 'meta.record.generic-db',
patterns: [
{include: 'etc#colon'},
{include: 'etc#tab'},
{include: '#field'}
]
}
},
scopeName: 'source.generic-db'
}
export default grammar