-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
source.nextflow.js
67 lines (65 loc) · 2.16 KB
/
source.nextflow.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
60
61
62
63
64
65
66
67
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed `mit`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
dependencies: ['source.nextflow-groovy'],
extensions: ['.nf'],
names: ['nextflow'],
patterns: [{include: '#nfl-rules'}],
repository: {
'code-block': {
begin: '{',
end: '}',
name: 'code.block.nextflow',
patterns: [{include: '#nfl-rules'}]
},
'nfl-rules': {
patterns: [
{include: '#process-def'},
{include: '#code-block'},
{include: 'source.nextflow-groovy'}
]
},
'process-body': {
begin: '{',
end: '(?=})',
name: 'process.body.nextflow',
patterns: [
{
match:
'(?:accelerator|afterScript|beforeScript|cache|cpus|conda|container|containerOptions|clusterOptions|disk|echo|errorStrategy|executor|ext|label|machineType|maxErrors|maxForks|maxRetries|memory|module|penv|pod|publishDir|queue|scratch|stageInMode|stageOutMode|storeDir|tag|time|validExitStatus)\\b',
name: 'process.directive.type.nextflow'
},
{
match: '(?:input|output|when|script|shell|exec):',
name: 'constant.block.nextflow'
},
{include: 'source.nextflow-groovy#comments'},
{include: 'source.nextflow-groovy#support-functions'},
{include: 'source.nextflow-groovy#keyword'},
{include: 'source.nextflow-groovy#values'},
{include: 'source.nextflow-groovy#anonymous-classes-and-new'},
{include: 'source.nextflow-groovy#types'},
{include: 'source.nextflow-groovy#parens'},
{include: 'source.nextflow-groovy#closures'},
{include: 'source.nextflow-groovy#braces'}
]
},
'process-def': {
begin: '^\\s*(process)\\s+(\\w+|"[^"]+"|\'[^\']+\')\\s*',
beginCaptures: {
1: {name: 'keyword.nextflow'},
2: {name: 'function.nextflow'}
},
end: '}',
name: 'process.nextflow',
patterns: [{include: '#process-body'}]
}
},
scopeName: 'source.nextflow'
}
export default grammar