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.

140 lines
4.3KB

  1. <?php
  2. /*************************************************************************************
  3. * chaiscript.php
  4. * --------------
  5. * Author: Jason Turner & Jonathan Turner
  6. * Copyright: (c) 2010 Jason Turner (lefticus@gmail.com),
  7. * (c) 2009 Jonathan Turner,
  8. * (c) 2004 Ben Keen (ben.keen@gmail.com), Benny Baumann (http://qbnz.com/highlighter)
  9. * Release Version: 1.0.8.11
  10. * Date Started: 2009/07/03
  11. *
  12. * ChaiScript language file for GeSHi.
  13. *
  14. * Based on JavaScript by Ben Keen (ben.keen@gmail.com)
  15. *
  16. * CHANGES
  17. * -------
  18. * 2010/03/30 (1.0.8.8)
  19. * - Updated to include more language features
  20. * - Removed left over pieces from JavaScript
  21. * 2009/07/03 (1.0.0)
  22. * - First Release
  23. *
  24. *************************************************************************************
  25. *
  26. * This file is part of GeSHi.
  27. *
  28. * GeSHi is free software; you can redistribute it and/or modify
  29. * it under the terms of the GNU General Public License as published by
  30. * the Free Software Foundation; either version 2 of the License, or
  31. * (at your option) any later version.
  32. *
  33. * GeSHi is distributed in the hope that it will be useful,
  34. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  35. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  36. * GNU General Public License for more details.
  37. *
  38. * You should have received a copy of the GNU General Public License
  39. * along with GeSHi; if not, write to the Free Software
  40. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  41. *
  42. ************************************************************************************/
  43. $language_data = array (
  44. 'LANG_NAME' => 'ChaiScript',
  45. 'COMMENT_SINGLE' => array(1 => '//'),
  46. 'COMMENT_MULTI' => array('/*' => '*/'),
  47. //Regular Expressions
  48. 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
  49. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  50. 'QUOTEMARKS' => array("'", '"'),
  51. 'ESCAPE_CHAR' => '\\',
  52. 'KEYWORDS' => array(
  53. 1 => array(
  54. 'break', 'else', 'elseif', 'eval', 'for', 'if', 'return', 'while', 'try', 'catch', 'finally',
  55. ),
  56. 2 => array(
  57. 'def', 'false', 'fun', 'true', 'var', 'attr',
  58. ),
  59. 3 => array(
  60. // built in functions
  61. 'throw',
  62. )
  63. ),
  64. 'SYMBOLS' => array(
  65. '(', ')', '[', ']', '{', '}',
  66. '+', '-', '*', '/', '%',
  67. '!', '@', '&', '|', '^',
  68. '<', '>', '=',
  69. ',', ';', '?', ':'
  70. ),
  71. 'CASE_SENSITIVE' => array(
  72. GESHI_COMMENTS => false,
  73. 1 => false,
  74. 2 => false,
  75. 3 => false
  76. ),
  77. 'STYLES' => array(
  78. 'KEYWORDS' => array(
  79. 1 => 'color: #000066; font-weight: bold;',
  80. 2 => 'color: #003366; font-weight: bold;',
  81. 3 => 'color: #000066;'
  82. ),
  83. 'COMMENTS' => array(
  84. 1 => 'color: #006600; font-style: italic;',
  85. 2 => 'color: #009966; font-style: italic;',
  86. 'MULTI' => 'color: #006600; font-style: italic;'
  87. ),
  88. 'ESCAPE_CHAR' => array(
  89. 0 => 'color: #000099; font-weight: bold;'
  90. ),
  91. 'BRACKETS' => array(
  92. 0 => 'color: #009900;'
  93. ),
  94. 'STRINGS' => array(
  95. 0 => 'color: #3366CC;'
  96. ),
  97. 'NUMBERS' => array(
  98. 0 => 'color: #CC0000;'
  99. ),
  100. 'METHODS' => array(
  101. 1 => 'color: #660066;'
  102. ),
  103. 'SYMBOLS' => array(
  104. 0 => 'color: #339933;'
  105. ),
  106. 'REGEXPS' => array(
  107. ),
  108. 'SCRIPT' => array(
  109. 0 => '',
  110. 1 => '',
  111. 2 => '',
  112. 3 => ''
  113. )
  114. ),
  115. 'URLS' => array(
  116. 1 => '',
  117. 2 => '',
  118. 3 => ''
  119. ),
  120. 'OOLANG' => true,
  121. 'OBJECT_SPLITTERS' => array(
  122. 1 => '.'
  123. ),
  124. 'REGEXPS' => array(
  125. ),
  126. 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
  127. 'SCRIPT_DELIMITERS' => array(
  128. 0 => array(
  129. ),
  130. 1 => array(
  131. )
  132. ),
  133. 'HIGHLIGHT_STRICT_BLOCK' => array(
  134. 0 => true,
  135. 1 => true
  136. )
  137. );
  138. ?>