-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLog.sublime-syntax
92 lines (90 loc) · 2.28 KB
/
Log.sublime-syntax
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
%YAML 1.2
---
name: Crackshell Log
first_line_match: '^#A000FF Log - [0-9]{4}-[0-9]+-[0-9]+$'
file_extensions:
- log
scope: text.log
variables:
path_identifier: '[A-za-z0-9\-_\.]'
full_path: '([A-Z]:)?({{path_identifier}}+[\\/])+{{path_identifier}}+'
contexts:
line-contents:
- match: '(>) (.*)'
captures:
1: punctuation.separator
2: string.unquoted
pop: true
- match: 'Game build ([0-9]+)'
captures:
1: constant.numeric
- match: 'Build:\s+'
push:
- match: '[A-Z0-9_]+'
scope: constant.language
- match: '(?=$)'
pop: true
- match: 'Launch options:\s+'
push:
- match: '([0-9]+):\s+(.*)(?=$)'
captures:
1: constant.numeric
2: string.unquoted
- match: '(?=$)'
pop: true
- match: 'Steam ID:\s+'
push:
- match: '[0-9a-f]{15}'
scope: constant.numeric
- match: '(?=$)'
pop: true
- match: '\s(class) ([^\s]+)'
captures:
1: storage.type.class
2: entity.name.class
- match: '([0-9\.]+) ms'
captures:
1: constant.numeric
- match: '[A-Za-z]+ = ([0-9]+)'
captures:
1: constant.numeric
- match: '\s{2}[A-Z][A-Za-z0-9\s]+:\s+'
push:
- match: '.*$'
scope: string.unquoted
pop: true
- match: '\bevent:/{{full_path}}\b'
scope: markup.italic
- match: '\b{{full_path}}\b'
scope: markup.italic
- match: '$'
pop: true
lines:
- match: '^\['
scope: punctuation.section.braces.begin
push:
- match: 'NFO'
scope: support.constant
- match: 'WRN'
scope: support.function
- match: 'ERR'
scope: markup.deleted
- match: 'DBG'
scope: support.module
- match: '\]'
scope: punctuation.section.braces.end
pop: true
- match: '\['
scope: punctuation.section.braces.begin
push:
- match: '[0-9]{2}'
scope: constant.numeric
- match: ':'
scope: punctuation.separator
- match: '\]'
scope: punctuation.section.braces.end
set: line-contents
main:
- match: '^#A000FF Log .*$'
scope: entity.name.section
set: lines