]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/vala.js
Initial commit.
[flow-web.git] / static / highlight / languages / vala.js
1 /*! `vala` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: Vala
8 Author: Antono Vasiljev <antono.vasiljev@gmail.com>
9 Description: Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.
10 Website: https://wiki.gnome.org/Projects/Vala
11 Category: system
12 */
13
14 function vala(hljs) {
15 return {
16 name: 'Vala',
17 keywords: {
18 keyword:
19 // Value types
20 'char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 '
21 + 'uint16 uint32 uint64 float double bool struct enum string void '
22 // Reference types
23 + 'weak unowned owned '
24 // Modifiers
25 + 'async signal static abstract interface override virtual delegate '
26 // Control Structures
27 + 'if while do for foreach else switch case break default return try catch '
28 // Visibility
29 + 'public private protected internal '
30 // Other
31 + 'using new this get set const stdout stdin stderr var',
32 built_in:
33 'DBus GLib CCode Gee Object Gtk Posix',
34 literal:
35 'false true null'
36 },
37 contains: [
38 {
39 className: 'class',
40 beginKeywords: 'class interface namespace',
41 end: /\{/,
42 excludeEnd: true,
43 illegal: '[^,:\\n\\s\\.]',
44 contains: [ hljs.UNDERSCORE_TITLE_MODE ]
45 },
46 hljs.C_LINE_COMMENT_MODE,
47 hljs.C_BLOCK_COMMENT_MODE,
48 {
49 className: 'string',
50 begin: '"""',
51 end: '"""',
52 relevance: 5
53 },
54 hljs.APOS_STRING_MODE,
55 hljs.QUOTE_STRING_MODE,
56 hljs.C_NUMBER_MODE,
57 {
58 className: 'meta',
59 begin: '^#',
60 end: '$',
61 }
62 ]
63 };
64 }
65
66 return vala;
67
68 })();
69
70 hljs.registerLanguage('vala', hljsGrammar);
71 })();