-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathsource.scm.js
59 lines (57 loc) · 1.65 KB
/
source.scm.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
52
53
54
55
56
57
58
59
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is developed at
// <https://github.com/jrieken/vscode-tree-sitter-query>
// and licensed `mit`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
extensions: [],
names: ['tree-sitter-query', 'tsq'],
patterns: [{include: '#expression'}],
repository: {
'bracket-expression': {
begin: '\\[',
beginCaptures: {0: {name: 'punctuation.paren.open'}},
end: '\\]',
endCaptures: {0: {name: 'punctuation.paren.close'}},
name: 'expression.group',
patterns: [{include: '#expression'}]
},
capture: {
patterns: [
{match: '\\@[a-zA-Z_.]+', name: 'variable.other.readwrite.scm'}
]
},
comment: {
begin: ';;',
beginCaptures: {0: {name: 'comment.line.scm'}},
end: '\\n',
name: 'comment.line.scm'
},
expression: {
patterns: [
{include: '#comment'},
{include: '#field'},
{include: '#capture'},
{include: '#node'},
{include: '#parent-expression'},
{include: '#bracket-expression'}
]
},
field: {patterns: [{match: '[a-zA-Z_]+:', name: 'entity.name.scm'}]},
node: {patterns: [{match: '[a-zA-Z_]+', name: 'node.scm'}]},
'paren-expression': {
begin: '\\(',
beginCaptures: {0: {name: 'punctuation.paren.open'}},
end: '\\)',
endCaptures: {0: {name: 'punctuation.paren.close'}},
name: 'expression.group',
patterns: [{include: '#expression'}]
}
},
scopeName: 'source.scm'
}
export default grammar