1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | function vala(hljs) {
|
9 | return {
|
10 | name: 'Vala',
|
11 | keywords: {
|
12 | keyword:
|
13 |
|
14 | 'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 '
|
15 | + 'uint16 uint32 uint64 float double bool struct enum string void '
|
16 |
|
17 | + 'weak unowned owned '
|
18 |
|
19 | + 'async signal static abstract interface override virtual delegate '
|
20 |
|
21 | + 'if while do for foreach else switch case break default return try catch '
|
22 |
|
23 | + 'public private protected internal '
|
24 |
|
25 | + 'using new this get set const stdout stdin stderr var',
|
26 | built_in:
|
27 | 'DBus GLib CCode Gee Object Gtk Posix',
|
28 | literal:
|
29 | 'false true null'
|
30 | },
|
31 | contains: [
|
32 | {
|
33 | className: 'class',
|
34 | beginKeywords: 'class interface namespace',
|
35 | end: /\{/,
|
36 | excludeEnd: true,
|
37 | illegal: '[^,:\\n\\s\\.]',
|
38 | contains: [ hljs.UNDERSCORE_TITLE_MODE ]
|
39 | },
|
40 | hljs.C_LINE_COMMENT_MODE,
|
41 | hljs.C_BLOCK_COMMENT_MODE,
|
42 | {
|
43 | className: 'string',
|
44 | begin: '"""',
|
45 | end: '"""',
|
46 | relevance: 5
|
47 | },
|
48 | hljs.APOS_STRING_MODE,
|
49 | hljs.QUOTE_STRING_MODE,
|
50 | hljs.C_NUMBER_MODE,
|
51 | {
|
52 | className: 'meta',
|
53 | begin: '^#',
|
54 | end: '$',
|
55 | }
|
56 | ]
|
57 | };
|
58 | }
|
59 |
|
60 | module.exports = vala;
|