ggdgsdbsdbbb / highlight / javascript.v
49 lines · 48 sloc · 682 bytes · 704ec3895e0beeff87c7e0a8619aa5cbed4302bd
Raw
1module highlight
2
3fn init_js() Lang {
4 return Lang{
5 name: 'JavaScript'
6 lang_extensions: ['js', 'mjs', 'jsx']
7 line_comments: '//'
8 mline_comments: ['/*', '*/']
9 string_start: ['"', "'"]
10 color: '#f1e05a'
11 keywords: [
12 'break',
13 'do',
14 'instanceof',
15 'typeof',
16 'case',
17 'else',
18 'new',
19 'var',
20 'catch',
21 'finally',
22 'return',
23 'void',
24 'continue',
25 'for',
26 'switch',
27 'while',
28 'debugger',
29 'function',
30 'this',
31 'with',
32 'default',
33 'if',
34 'throw',
35 'delete',
36 'in',
37 'of',
38 'try',
39 'as',
40 'let',
41 'const',
42 'import',
43 'export',
44 'yield',
45 'false',
46 'true',
47 ]
48 }
49}
50