forked from wooorm/starry-night
-
Notifications
You must be signed in to change notification settings - Fork 0
/
text.python.traceback.js
35 lines (34 loc) · 1015 Bytes
/
text.python.traceback.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
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is developed at
// <https://github.com/MagicStack/MagicPython>
// and licensed `mit`.
// See <https://github.com/wooorm/starry-night> for more info.
/** @type {import('../lib/index.js').Grammar} */
const grammar = {
dependencies: ['source.python'],
extensions: ['.pytb'],
names: ['python-traceback'],
patterns: [
{
captures: {
1: {name: 'string.python.traceback'},
2: {name: 'constant.numeric.python.traceback'},
3: {name: 'entity.name.function.python.traceback'}
},
match: '^ File ("[^"]+"), line (\\d+)(?:, in (.+))?$'
},
{
captures: {1: {patterns: [{include: 'source.python'}]}},
match: '^ (.+)$'
},
{
captures: {
1: {name: 'entity.name.type.class.python.traceback'},
2: {name: 'string.python.traceback'}
},
match: '^([^\\s:]+):(?: (.+))?$'
}
],
scopeName: 'text.python.traceback'
}
export default grammar