-
Notifications
You must be signed in to change notification settings - Fork 5
/
WDL.YAML-tmLanguage
128 lines (105 loc) · 3.86 KB
/
WDL.YAML-tmLanguage
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# [PackageDev] target_format: plist, ext: tmLanguage
name: WDL
scopeName: source.wdl
fileTypes: [wdl]
uuid: 29cdcefa-8185-46f9-988a-2310d2244661
patterns:
- name: keyword.operator.assignment.wdl
match: \=
- name: keyword.operator.comparison.wdl
match: <\=|>\=|\=\=|<|>|\!\=
- name: keyword.operator.assignment.augmented.wdl
match: \+\=|-\=|\*\=|/\=|//\=|%\=|&\=|\|\=|\^\=|>>\=|<<\=|\*\*\=
- name: keyword.operator.arithmetic.wdl
match: \+|\-|\*|\*\*|/|//|%|<<|>>|&|\||\^|~
- name: constant.language.wdl
match: \b(true|false)\b
- include: '#builtin_types'
- include: '#comments'
- include: '#input_output'
- include: '#keywords'
- include: '#string_quoted_single'
- include: '#string_quoted_double'
- include: '#command_block'
repository:
builtin_types:
name: support.type.wdl
match: (?<!\.)\b(Array|Boolean|File|Float|Int|Map|Object|String|Pair)\b
comments:
patterns:
- name: comment.line.number-sign.wdl
match: (#).*$\n?
captures:
'1': {name: punctuation.definition.comment.wdl}
constant_placeholder:
name: constant.other.placeholder.wdl
match: (?i:%(\([a-z_]+\))?#?0?\-?[ ]?\+?([0-9]*|\*)(\.([0-9]*|\*))?[hL]?[a-z%])
escaped_char:
match: (\\x[0-9a-fA-F]{2})|(\\[0-7]{3})|(\\\n)|(\\\\)|(\\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)
captures:
'1': {name: constant.character.escape.hex.wdl}
'2': {name: constant.character.escape.octal.wdl}
'3': {name: constant.character.escape.newline.wdl}
'4': {name: constant.character.escape.backlash.wdl}
'5': {name: constant.character.escape.double-quote.wdl}
'6': {name: constant.character.escape.single-quote.wdl}
'7': {name: constant.character.escape.bell.wdl}
'8': {name: constant.character.escape.backspace.wdl}
'9': {name: constant.character.escape.formfeed.wdl}
'10': {name: constant.character.escape.linefeed.wdl}
'11': {name: constant.character.escape.return.wdl}
'12': {name: constant.character.escape.tab.wdl}
'13': {name: constant.character.escape.vertical-tab.wdl}
escaped_unicode_char:
match: (\\U[0-9A-Fa-f]{8})|(\\u[0-9A-Fa-f]{4})|(\\N\{[a-zA-Z0-9\, ]+\})
captures:
'1': {name: constant.character.escape.unicode.16-bit-hex.wdl}
'2': {name: constant.character.escape.unicode.32-bit-hex.wdl}
'3': {name: constant.character.escape.unicode.name.wdl}
keywords:
patterns:
- name: keyword.other.wdl
match: (^|\s)(call|runtime|task|workflow|if|then|else|import|as|input|output|meta|parameter_meta|scatter)[^A-Za-z_]
string_quoted_double:
patterns:
- comment: double quoted string
name: string.quoted.double.single-line.wdl
begin: (")
beginCaptures:
'1': {name: punctuation.definition.string.begin.wdl}
end: (")
endCaptures:
'1': {name: punctuation.definition.string.end.wdl}
'2': {name: invalid.illegal.unclosed-string.wdl}
patterns:
- include: '#constant_placeholder'
- include: '#escaped_char'
string_quoted_single:
patterns:
- comment: single quoted string
name: string.quoted.single.single-line.wdl
begin: (')
beginCaptures:
'1': {name: punctuation.definition.string.begin.wdl}
end: (')
endCaptures:
'1': {name: punctuation.definition.string.end.wdl}
'2': {name: invalid.illegal.unclosed-string.wdl}
patterns:
- include: '#constant_placeholder'
- include: '#escaped_char'
command_block:
patterns:
- comment: command {}
name: command.block.wdl
begin: (command)\s*\{(\n|\s)*
beginCaptures:
'1': {name: keyword.other.wdl}
end: (^|\s+)\}
- comment: command <<< >>>
name: command.block.wdl
begin: (command)\s*<{3}(\n|\s)*
beginCaptures:
'1': {name: keyword.other.wdl}
end: (^|\s+)>{3}
author: Andrew Teixeira <teixeira@broadinstitute.org>