-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPep8.JSON-tmLanguage
100 lines (98 loc) · 3.26 KB
/
Pep8.JSON-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
// [PackageDev] target_format: plist, ext: tmLanguage
{ "name": "Pep8",
"scopeName": "source.pep8",
"fileTypes": ["pep"],
"uuid": "b2423139-ebee-4453-bb51-74755ea62af4",
"patterns": [
{ "include": "#strings" },
{ "include": "#comment-single-line" },
{ "include": "#variable" },
{ "include": "#constant" },
{ "include": "#storage" },
{ "include": "#keyword" },
{ "include": "#entity" }
],
"repository": {
"simple-string": {
"name": "string.quoted.double.pep8",
"begin": "\\\"",
"end": "\\\"",
"patterns": [
{ "name": "string.char.pep8",
"match": "([^\\\\]|\\\\.)"
}
]
},
"character": {
"name": "string.character.pep8",
"match": "('[^\\\\']'|'\\\\.')"
},
"strings": {
"patterns": [
{
"include": "#character",
"include": "#simple-string"
}
]
},
"comments": {
"patterns": [
{ "include": "#comment-single-line" }
]
},
"comment-single-line": {
"name": "comment.singleline.pep8",
"match": ";.*"
},
"constant": {
"patterns": [
{ "name": "constant.numeric.hex.pep8",
"match": "-?0(x|X)[0-9A-Fa-f]+"
},
{ "name": "constant.numeric.int.pep8",
"match": "-?([0-9]+)"
}
]
},
"storage": {
"patterns": [
{ "name": "storage.type.pep8",
"match": "[.](([bB][uU][rR][nN])|([eE][qQ][uU][aA][tT][eE])|([bB][lL][oO][cC][kK])|([eE][nN][dD])|([bB][yY][tT][eE])|([wW][oO][rR][dD])|([aA][dD][dD][rR][sS][sS])|([aA][sS][cC][iI][iI]))"
}
]
},
"variable": {
"patterns": [
{
"name": "variable.other.pep8",
"match": "[a-z][a-zA-Z0-9_]* *[:]?"
}
]
},
"entity": {
"patterns": [
{ "name": "entity.other.attribute-name.pep8",
"match": ", *(i|d|x|n|(sx?f?))"
},
{ "name": "entity.whitespaces.pep8",
"match": "( |\\t)*"
}
]
},
"keyword": {
"patterns": [
{
"name": "keyword.control.pep8",
"match": "([cC][aA][lL][lL])|([sS][tT][oO][pP])|([bB][rR]((([lL]|[gG])([tT]|[eE]))|([eE][qQ])|([nN][eE])|[vV]|[cC])?)|([rR][eE][tT]([0-7]|([tT][rR])))\\b"
},
{ "name": "keyword.operator.pep8",
"match": "(([aA][dD][dD])|([sS][uU][bB])|([nN][oO][tT])|([nN][eE][gG])|([aA][sS]([lL]|[rR]))|([rR][oO]([lL]|[rR]))|([oO][rR])|([cC][pP]))([aA]|[xX])\\b"
},
{
"name": "keyword.misc.pep8",
"match": "([mM][oO][vV]([sS][pP]|[fF][lL][gG])[aA])|([nN][oO][pP][0-3]?)|((([aA][dD][dD])|([sS][uU][bB]))[sS][pP])|([dD][eE][cC]([iI]|[oO]))|((([lL][dD])|([sS][tT]))([bB][yY][tT][eE])?([aA]|[xX]))|([cC][hH][aA][rR]([iI]|[oO]))|([sS][tT][rR][oO])\\b"
}
]
}
}
}