KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
5.0KB

  1. <?php
  2. /*************************************************************************************
  3. * vala.php
  4. * ----------
  5. * Author: Nicolas Joseph (nicolas.joseph@valaide.org)
  6. * Copyright: (c) 2009 Nicolas Joseph
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2009/04/29
  9. *
  10. * Vala language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. *
  15. * TODO
  16. * ----
  17. *
  18. *************************************************************************************
  19. *
  20. * This file is part of GeSHi.
  21. *
  22. * GeSHi is free software; you can redistribute it and/or modify
  23. * it under the terms of the GNU General Public License as published by
  24. * the Free Software Foundation; either version 2 of the License, or
  25. * (at your option) any later version.
  26. *
  27. * GeSHi is distributed in the hope that it will be useful,
  28. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  30. * GNU General Public License for more details.
  31. *
  32. * You should have received a copy of the GNU General Public License
  33. * along with GeSHi; if not, write to the Free Software
  34. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  35. *
  36. ************************************************************************************/
  37. $language_data = array (
  38. 'LANG_NAME' => 'Vala',
  39. 'COMMENT_SINGLE' => array(1 => '//'),
  40. 'COMMENT_MULTI' => array('/*' => '*/'),
  41. 'COMMENT_REGEXP' => array(
  42. //Using and Namespace directives (basic support)
  43. //Please note that the alias syntax for using is not supported
  44. 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'),
  45. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  46. 'QUOTEMARKS' => array("'", '"'),
  47. 'HARDQUOTE' => array('"""'),
  48. 'HARDESCAPE' => array('"'),
  49. 'ESCAPE_CHAR' => '\\',
  50. 'KEYWORDS' => array(
  51. 1 => array(
  52. 'as', 'abstract', 'base', 'break', 'case', 'catch', 'const',
  53. 'construct', 'continue', 'default', 'delete', 'dynamic', 'do',
  54. 'else', 'ensures', 'extern', 'false', 'finally', 'for', 'foreach',
  55. 'get', 'if', 'in', 'inline', 'internal', 'lock', 'namespace',
  56. 'null', 'out', 'override', 'private', 'protected', 'public', 'ref',
  57. 'requires', 'return', 'set', 'static', 'switch', 'this', 'throw',
  58. 'throws', 'true', 'try', 'using', 'value', 'var', 'virtual',
  59. 'volatile', 'void', 'yield', 'yields', 'while'
  60. ),
  61. 2 => array(
  62. '#elif', '#endif', '#else', '#if'
  63. ),
  64. 3 => array(
  65. 'is', 'new', 'owned', 'sizeof', 'typeof', 'unchecked', 'unowned', 'weak'
  66. ),
  67. 4 => array(
  68. 'bool', 'char', 'class', 'delegate', 'double', 'enum',
  69. 'errordomain', 'float', 'int', 'int8', 'int16', 'int32', 'int64',
  70. 'interface', 'long', 'short', 'signal', 'size_t', 'ssize_t',
  71. 'string', 'struct', 'uchar', 'uint', 'uint8', 'uint16', 'uint32',
  72. 'ulong', 'unichar', 'ushort'
  73. )
  74. ),
  75. 'SYMBOLS' => array(
  76. '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';',
  77. '(', ')', '{', '}', '[', ']', '|'
  78. ),
  79. 'CASE_SENSITIVE' => array(
  80. GESHI_COMMENTS => false,
  81. 1 => true,
  82. 2 => true,
  83. 3 => true,
  84. 4 => true,
  85. ),
  86. 'STYLES' => array(
  87. 'KEYWORDS' => array(
  88. 1 => 'color: #0600FF;',
  89. 2 => 'color: #FF8000; font-weight: bold;',
  90. 3 => 'color: #008000;',
  91. 4 => 'color: #FF0000;'
  92. ),
  93. 'COMMENTS' => array(
  94. 1 => 'color: #008080; font-style: italic;',
  95. 3 => 'color: #008080;',
  96. 'MULTI' => 'color: #008080; font-style: italic;'
  97. ),
  98. 'ESCAPE_CHAR' => array(
  99. 0 => 'color: #008080; font-weight: bold;',
  100. 'HARD' => 'color: #008080; font-weight: bold;'
  101. ),
  102. 'BRACKETS' => array(
  103. 0 => 'color: #000000;'
  104. ),
  105. 'STRINGS' => array(
  106. 0 => 'color: #666666;',
  107. 'HARD' => 'color: #666666;'
  108. ),
  109. 'NUMBERS' => array(
  110. 0 => 'color: #FF0000;'
  111. ),
  112. 'METHODS' => array(
  113. 1 => 'color: #0000FF;',
  114. 2 => 'color: #0000FF;'
  115. ),
  116. 'SYMBOLS' => array(
  117. 0 => 'color: #008000;'
  118. ),
  119. 'REGEXPS' => array(
  120. ),
  121. 'SCRIPT' => array(
  122. )
  123. ),
  124. 'URLS' => array(
  125. 1 => '',
  126. 2 => '',
  127. 3 => '',
  128. 4 => ''
  129. ),
  130. 'OOLANG' => true,
  131. 'OBJECT_SPLITTERS' => array(
  132. 1 => '.'
  133. ),
  134. 'REGEXPS' => array(
  135. ),
  136. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  137. 'SCRIPT_DELIMITERS' => array(
  138. ),
  139. 'HIGHLIGHT_STRICT_BLOCK' => array(
  140. ),
  141. 'TAB_WIDTH' => 4,
  142. 'PARSER_CONTROL' => array(
  143. 'KEYWORDS' => array(
  144. 'DISALLOWED_BEFORE' => "(?<![a-zA-Z0-9\$_\|\#>|^])",
  145. 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])"
  146. )
  147. )
  148. );
  149. ?>