l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

vala.js (1820B)


      1 /*
      2 Language: Vala
      3 Author: Antono Vasiljev <antono.vasiljev@gmail.com>
      4 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.
      5 Website: https://wiki.gnome.org/Projects/Vala
      6 */
      7 
      8 function vala(hljs) {
      9   return {
     10     name: 'Vala',
     11     keywords: {
     12       keyword:
     13         // Value types
     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         // Reference types
     17         'weak unowned owned ' +
     18         // Modifiers
     19         'async signal static abstract interface override virtual delegate ' +
     20         // Control Structures
     21         'if while do for foreach else switch case break default return try catch ' +
     22         // Visibility
     23         'public private protected internal ' +
     24         // Other
     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', end: '{', excludeEnd: true,
     35         illegal: '[^,:\\n\\s\\.]',
     36         contains: [
     37           hljs.UNDERSCORE_TITLE_MODE
     38         ]
     39       },
     40       hljs.C_LINE_COMMENT_MODE,
     41       hljs.C_BLOCK_COMMENT_MODE,
     42       {
     43         className: 'string',
     44         begin: '"""', end: '"""',
     45         relevance: 5
     46       },
     47       hljs.APOS_STRING_MODE,
     48       hljs.QUOTE_STRING_MODE,
     49       hljs.C_NUMBER_MODE,
     50       {
     51         className: 'meta',
     52         begin: '^#', end: '$',
     53         relevance: 2
     54       }
     55     ]
     56   };
     57 }
     58 
     59 module.exports = vala;