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.

162 lines
6.3KB

  1. <?php
  2. /*************************************************************************************
  3. * lb.php
  4. * --------
  5. * Author: Chris Iverson (cj.no.one@gmail.com)
  6. * Copyright: (c) 2010 Chris Iverson
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2010/07/18
  9. *
  10. * Liberty BASIC language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2010/07/22
  15. * - First Release
  16. *
  17. * 2010/08/23
  18. * - Added missing default variables
  19. *
  20. * TODO (updated 2010/07/20)
  21. * -------------------------
  22. * Prevent highlighting numbers in handle names(constants beginning with #)
  23. * Allow number highlighting after a single period(e.g. .9 = 0.9, should be
  24. * highlighted
  25. * Prevent highlighting keywords within branch labels(within brackets)
  26. *
  27. *************************************************************************************
  28. *
  29. * This file is part of GeSHi.
  30. *
  31. * GeSHi is free software; you can redistribute it and/or modify
  32. * it under the terms of the GNU General Public License as published by
  33. * the Free Software Foundation; either version 2 of the License, or
  34. * (at your option) any later version.
  35. *
  36. * GeSHi is distributed in the hope that it will be useful,
  37. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  38. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  39. * GNU General Public License for more details.
  40. *
  41. * You should have received a copy of the GNU General Public License
  42. * along with GeSHi; if not, write to the Free Software
  43. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  44. *
  45. ************************************************************************************/
  46. $language_data = array(
  47. 'LANG_NAME' => 'Liberty BASIC',
  48. 'COMMENT_SINGLE' => array(1 => '\''),
  49. 'COMMENT_MULTI' => array(),
  50. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  51. 'QUOTEMARKS' => array('"'),
  52. 'ESCAPE_CHAR' => '',
  53. 'KEYWORDS' => array(
  54. 1 => array(
  55. 'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean',
  56. 'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case',
  57. 'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm',
  58. 'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump',
  59. 'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog',
  60. 'files', 'fontdialog', 'for', 'function', 'get', 'gettrim',
  61. 'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox',
  62. 'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp',
  63. 'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu',
  64. 'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on',
  65. 'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi',
  66. 'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr',
  67. 'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick',
  68. 'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan',
  69. 'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi',
  70. 'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor',
  71. 'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp',
  72. 'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while',
  73. 'word', 'xor'
  74. ),
  75. 2 => array(
  76. 'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$',
  77. 'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd',
  78. 'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof',
  79. 'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not',
  80. 'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab',
  81. 'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val',
  82. 'winstring', 'word$'
  83. ),
  84. 3 => array(
  85. 'BackgroundColor$', 'Com', 'ComboboxColor$', 'ComError', 'ComErrorNumber',
  86. 'CommandLine$', 'ComPortNumber', 'DefaultDir$',
  87. 'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$',
  88. 'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z',
  89. 'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z',
  90. 'Joy2button1', 'Joy2button2', 'ListboxColor$', 'MouseX', 'MouseY', 'Platform$',
  91. 'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$', 'StartupDir$',
  92. 'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight',
  93. 'WindowWidth', 'UpperLeftX', 'UpperLeftY'
  94. )
  95. ),
  96. 'SYMBOLS' => array(
  97. 1 => array(
  98. '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#'
  99. )
  100. ),
  101. 'CASE_SENSITIVE' => array(
  102. GESHI_COMMENTS => false,
  103. 1 => false,
  104. 2 => false,
  105. 3 => true
  106. ),
  107. 'STYLES' => array(
  108. 'KEYWORDS' => array(
  109. 1 => 'color: #0000FF;',
  110. 2 => 'color: #AD0080;',
  111. 3 => 'color: #008080;'
  112. ),
  113. 'COMMENTS' => array(
  114. 1 => 'color: #666666; font-style: italic;',
  115. 'MULTI' => 'color: #666666; font-style: italic;'
  116. ),
  117. 'ESCAPE_CHAR' => array(
  118. 0 => 'color: #000099; font-weight: bold;'
  119. ),
  120. 'BRACKETS' => array(
  121. 0 => 'color: #009900;'
  122. ),
  123. 'STRINGS' => array(
  124. 0 => 'color: #008000;'
  125. ),
  126. 'NUMBERS' => array(
  127. 0 => 'color: #FF0000;',
  128. ),
  129. 'METHODS' => array(
  130. 0 => 'color: #004000;'
  131. ),
  132. 'SYMBOLS' => array(
  133. 1 => 'color: #339933;'
  134. ),
  135. 'REGEXPS' => array(),
  136. 'SCRIPT' => array()
  137. ),
  138. 'URLS' => array(
  139. 1 => '',
  140. 2 => '',
  141. 3 => ''
  142. ),
  143. 'OOLANG' => false,
  144. 'OBJECT_SPLITTERS' => array(),
  145. 'REGEXPS' => array(),
  146. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  147. 'SCRIPT_DELIMITERS' => array(),
  148. 'HIGHLIGHT_STRICT_BLOCK' => array(),
  149. 'PARSER_CONTROL' => array(
  150. 'KEYWORDS' => array(
  151. 2 => array(
  152. //In LB, the second keyword list is a list of built-in functions,
  153. //and their names should not be highlighted unless being used
  154. //as a function name.
  155. 'DISALLOWED_AFTER' => '(?=\s*\()'
  156. )
  157. )
  158. )
  159. );
  160. ?>