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.

haxe.php 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. /*************************************************************************************
  3. * haxe.php
  4. * --------
  5. * Author: Andy Li (andy@onthewings.net)
  6. * John Liao (colorhook@gmail.com)
  7. * Copyright: (c) 2012 onthewings (http://www.onthewings.net/)
  8. * 2010 colorhook (http://colorhook.com/)
  9. * Release Version: 1.0.8.11
  10. * Date Started: 2010/10/05
  11. *
  12. * Haxe language file for GeSHi.
  13. * Haxe version: 2.10
  14. *************************************************************************************
  15. *
  16. * This file is part of GeSHi.
  17. *
  18. * GeSHi is free software; you can redistribute it and/or modify
  19. * it under the terms of the GNU General Public License as published by
  20. * the Free Software Foundation; either version 2 of the License, or
  21. * (at your option) any later version.
  22. *
  23. * GeSHi is distributed in the hope that it will be useful,
  24. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. * GNU General Public License for more details.
  27. *
  28. * You should have received a copy of the GNU General Public License
  29. * along with GeSHi; if not, write to the Free Software
  30. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  31. *
  32. ************************************************************************************/
  33. $language_data = array (
  34. 'LANG_NAME' => 'Haxe',
  35. 'COMMENT_SINGLE' => array(1 => '//'),
  36. 'COMMENT_MULTI' => array('/*' => '*/'),
  37. 'COMMENT_REGEXP' => array(
  38. //Import and Package directives (Basic Support only)
  39. 2 => '/(?:(?<=import[\\n\\s])|(?<=using[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i',
  40. // Haxe comments
  41. 3 => '#/\*\*(?![\*\/]).*\*/#sU',
  42. ),
  43. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  44. 'QUOTEMARKS' => array("'", '"'),
  45. 'ESCAPE_CHAR' => '\\',
  46. 'KEYWORDS' => array(
  47. 1 => array(
  48. //http://haxe.org/ref/keywords
  49. 'break', 'callback', 'case', 'cast', 'catch', 'class', 'continue', 'default', 'do', 'dynamic',
  50. 'else', 'enum', 'extends', 'extern', /*'false',*/ 'for', 'function', 'here', 'if',
  51. 'implements', 'import', 'in', 'inline', 'interface', 'never', 'new', /*'null',*/ 'override',
  52. 'package', 'private', 'public', 'return', 'static', 'super', 'switch', 'this', 'throw',
  53. 'trace', /*'true',*/ 'try', 'typedef', 'untyped', 'using', 'var', 'while',
  54. 'macro', '$type',
  55. ),
  56. 2 => array(
  57. //primitive values
  58. 'null', 'false', 'true',
  59. ),
  60. 3 => array(
  61. //global types
  62. 'Array', 'ArrayAccess', /*'Bool',*/ 'Class', 'Date', 'DateTools', 'Dynamic',
  63. 'EReg', 'Enum', 'EnumValue', /*'Float',*/ 'Hash', /*'Int',*/ 'IntHash', 'IntIter',
  64. 'Iterable', 'Iterator', 'Lambda', 'List', 'Math', 'Null', 'Reflect', 'Std',
  65. /*'String',*/ 'StringBuf', 'StringTools', 'Sys', 'Type', /*'UInt',*/ 'ValueType',
  66. /*'Void',*/ 'Xml', 'XmlType',
  67. ),
  68. 4 => array(
  69. //primitive types
  70. 'Void', 'Bool', 'Int', 'Float', 'UInt', 'String',
  71. ),
  72. 5 => array(
  73. //compiler switches
  74. "#if", "#elseif", "#else", "#end", "#error",
  75. ),
  76. ),
  77. 'SYMBOLS' => array(
  78. //http://haxe.org/manual/operators
  79. '++', '--',
  80. '%',
  81. '*', '/',
  82. '+', '-',
  83. '<<', '>>', '>>>',
  84. '|', '&', '^',
  85. '==', '!=', '>', '>=', '<', '<=',
  86. '...',
  87. '&&',
  88. '||',
  89. '?', ':',
  90. '=', '+=', '-=', '/=', '*=', '<<=', '>>=', '>>>=', '|=', '&=', '^=',
  91. '(', ')', '[', ']', '{', '}', ';',
  92. ),
  93. 'CASE_SENSITIVE' => array(
  94. GESHI_COMMENTS => false,
  95. 1 => true,
  96. 2 => true,
  97. 3 => true,
  98. 4 => true,
  99. 5 => true,
  100. ),
  101. 'STYLES' => array(
  102. 'KEYWORDS' => array(
  103. 1 => 'color: #6699cc; font-weight: bold;',
  104. 2 => 'color: #000066; font-weight: bold;',
  105. 3 => 'color: #03F; ',
  106. 4 => 'color: #000033; font-weight: bold;',
  107. 5 => 'color: #330000; font-weight: bold;',
  108. ),
  109. 'COMMENTS' => array(
  110. 1 => 'color: #666666; font-style: italic;',
  111. 2 => 'color: #006699;',
  112. 3 => 'color: #008000; font-style: italic; font-weight: bold;',
  113. 3 => 'color: #008000; font-style: italic; font-weight: bold;',
  114. 'MULTI' => 'color: #666666; font-style: italic;',
  115. ),
  116. 'ESCAPE_CHAR' => array(
  117. 0 => 'color: #000099; font-weight: bold;',
  118. ),
  119. 'BRACKETS' => array(
  120. 0 => 'color: #000000;',
  121. ),
  122. 'STRINGS' => array(
  123. 0 => 'color: #FF0000;',
  124. ),
  125. 'NUMBERS' => array(
  126. 0 => 'color: #cc66cc;',
  127. ),
  128. 'METHODS' => array(
  129. 1 => 'color: #006633;',
  130. 2 => 'color: #006633;',
  131. ),
  132. 'SYMBOLS' => array(
  133. 0 => 'color: #339933;',
  134. ),
  135. 'SCRIPT' => array(
  136. ),
  137. 'REGEXPS' => array(
  138. )
  139. ),
  140. 'URLS' => array(
  141. 1 => '',
  142. 2 => '',
  143. 3 => '',
  144. 4 => '',
  145. 5 => '',
  146. ),
  147. 'OOLANG' => true,
  148. 'OBJECT_SPLITTERS' => array(
  149. 1 => '.',
  150. ),
  151. 'REGEXPS' => array(
  152. ),
  153. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  154. 'SCRIPT_DELIMITERS' => array(
  155. ),
  156. 'HIGHLIGHT_STRICT_BLOCK' => array(
  157. ),
  158. );
  159. ?>