-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathLog Highlight.YAML-tmLanguage
54 lines (53 loc) · 1.36 KB
/
Log Highlight.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
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Log Highlight
scopeName: source.loghighlight
fileTypes: []
uuid: 0ed2482c-a94a-49dc-9aae-b1401bcff2e0
patterns:
- comment: ...
name: summary.title
begin: 'Log Highlight'
end: '[\r\n]'
- name: msg.error
begin: '^Error-\['
end: '^\s*[\n]'
patterns:
- include: '#error_link'
- include: '#error_quote'
- name: msg.error
begin: '^(\"?[\w\d\:\\/\.\-\=]+\.\w+[\w\d]*\"?\s*[,:line]{1,5}\s*\d+)*.*?(?i)error'
beginCaptures:
'1': {name: msg.error.link}
end: '[\r\n]'
patterns:
- include: '#error_link'
- include: '#error_quote'
- name: msg.warning
begin: '^Warning-\['
end: '^\s*[\n]'
patterns:
- include: '#warning_link'
- include: '#warning_quote'
- name: msg.warning
begin: '^(\"?[\w\d\:\\/\.\-\=]+\.\w+[\w\d]*\"?\s*[,:line]{1,5}\s*\d+)*.*?(?i)warning'
beginCaptures:
'1': {name: msg.warning.link}
end: '[\r\n]'
patterns:
- include: '#warning_link'
- include: '#warning_quote'
repository:
error_link:
name: msg.error.link
match: '\"?[\w\d\:\\/\.\-\=]+\.\w+[\w\d]*\"?\s*[,:line]{1,5}\s*\d+'
error_quote:
name: msg.error.quote
match: (["'])(?:(?=(\\?))\2.)*?\1
warning_link:
name: msg.warning.link
match: '\"?[\w\d\:\\/\.\-\=]+\.\w+[\w\d]*\"?\s*[,:line]{1,5}\s*\d+'
warning_quote:
name: msg.warning.quote
match: (["'])(?:(?=(\\?))\2.)*?\1
...