-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflow-file.YAML-tmLanguage
88 lines (70 loc) · 2.33 KB
/
flow-file.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
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: flow file
scopeName: source.flow
fileTypes: ['flow']
uuid: dda0dbdd-79ee-4944-a477-0b74c43d65b1
patterns:
- include: '#keyword_objects'
- include: '#keyword_roots'
- include: '#keyword_arrays'
- include: '#keyword_string'
- include: '#numeric_values'
- include: '#bool_values'
- include: '#string_values'
- include: '#normal_objects'
- include: '#normal_numeric'
- include: '#comments'
repository:
bool_values:
name: constant.numeric.flow
match: \"?\b(true|false)\b\"?
numeric_values:
name: constant.numeric.flow
match: \"?\b(\d+)\b\"?
string_values:
patterns:
- name: string.quoted.flow
begin: ("|')
end: ("|')
keyword_objects:
name: meta.keyword_objects.flow
match: \"?\b(dependencies|flags|defines|web|mobile|ios|android|libs|native)\b\"?(?:.*[:]\s*[{])
captures:
'1': { name: keyword.control.definition.keyword_objects.flow }
normal_objects:
name: meta.normal_objects.flow
match: \"?\b(.*)\b\"?(?:.*[:]\s*[{])
captures:
'1': { name: entity.name.function.normal_objects.flow }
normal_numeric:
name: meta.normal_numeric.flow
match: \"?\b(.*)\b\"?\s*[:]\s*(\d+)
captures:
'1': { name: entity.name.identifier.normal_numeric.flow }
'2': { name: constant.numeric.normal_numeric.flow }
keyword_roots:
name: meta.keyword_roots.flow
match: \"?\b(project|flow|app|build|files|if)\"?\b\"?(?:.*[:]\s*[{])
captures:
'1': { name: support.type.keyword_roots.flow }
keyword_arrays:
name: meta.keyword_arrays.flow
match: \"?\b(flags|defines|codepaths)\b\"?(?:.*[:]\s*[\[])
captures:
'1': { name: keyword.control.definition.keyword_arrays.flow }
keyword_string:
name: meta.keyword_string.flow
match: \"?\b(name|version|author|package|icon|main|output)\b\"?\s*[:]\s*(['].*[']|["].*["])
captures:
'1': { name: keyword.control.definition.keyword_string.flow }
'2': { name: string.quoted.keyword_string.flow }
comments:
patterns:
- name: comment.line.double-slash.flow
match: (//).*$\n?
captures:
'1': {name: punctuation.definition.comment.flow}
# illegal:
# name: invalid.illegal.unescaped.characters.flow
# match: (?:([^\/"']+|\/\*(?:[^*]|\*+[^*\/])*\*+\/|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|\/\/.*)