vala.js 1.7 KB

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