plz / highlight / python.v
47 lines · 46 sloc · 629 bytes · 704ec3895e0beeff87c7e0a8619aa5cbed4302bd
Raw
1module highlight
2
3fn init_py() Lang {
4 return Lang{
5 name: 'Python'
6 lang_extensions: ['py', 'ipynb']
7 line_comments: '#'
8 string_start: ['"', "'", '"""', "'''"]
9 color: '#3572A5'
10 keywords: [
11 'None',
12 'True',
13 'and',
14 'as',
15 'assert',
16 'async',
17 'await',
18 'break',
19 'class',
20 'continue',
21 'def',
22 'del',
23 'elif',
24 'else',
25 'except',
26 'finally',
27 'for',
28 'from',
29 'global',
30 'if',
31 'import',
32 'in',
33 'is',
34 'lambda',
35 'nonlocal',
36 'not',
37 'or',
38 'pass',
39 'raise',
40 'return',
41 'try',
42 'while',
43 'with',
44 'yield',
45 ]
46 }
47}
48