-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
source.groovy.gradle.js
49 lines (47 loc) · 1.26 KB
/
source.groovy.gradle.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
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed `apache-2.0`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
dependencies: ['source.groovy'],
extensions: ['.gradle'],
names: ['gradle'],
patterns: [{include: '#gradle'}],
repository: {
blocks: {
patterns: [
{
begin: '(?!<project\\.)(\\w+)\\s*{',
beginCaptures: {1: {name: 'entity.name.block.groovy.gradle'}},
end: '}',
name: 'meta.definition.block.groovy.gradle',
patterns: [{include: '#gradle-groovy'}]
}
]
},
gradle: {
patterns: [
{include: '#tasks'},
{include: '#blocks'},
{include: 'source.groovy'}
]
},
'gradle-groovy': {patterns: [{include: 'source.groovy'}]},
tasks: {
patterns: [
{
begin: 'task\\s+(\\w+)\\s*(?=[\\({])',
beginCaptures: {1: {name: 'entity.name.task.groovy.gradle'}},
end: '^',
name: 'meta.definition.task.groovy.gradle',
patterns: [{include: '#gradle-groovy'}]
}
]
}
},
scopeName: 'source.groovy.gradle'
}
export default grammar