vala.js 1.4 KB

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