[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/geshi/geshi/ -> javascript.php (source)

   1  <?php
   2  // no direct access
   3  defined('_JEXEC') or die;
   4  
   5  /*************************************************************************************
   6   * javascript.php
   7   * --------------
   8   * Author: Ben Keen (ben.keen@gmail.com)
   9   * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
  10   * Release Version: 1.0.8.10
  11   * Date Started: 2004/06/20
  12   *
  13   * JavaScript language file for GeSHi.
  14   *
  15   * CHANGES
  16   * -------
  17   * 2008/05/23 (1.0.7.22)
  18   *  -  Added description of extra language features (SF#1970248)
  19   * 2004/11/27 (1.0.1)
  20   *  -  Added support for multiple object splitters
  21   * 2004/10/27 (1.0.0)
  22   *  -  First Release
  23   *
  24   * TODO (updated 2004/11/27)
  25   * -------------------------
  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  
  47  $language_data = array (
  48      'LANG_NAME' => 'Javascript',
  49      'COMMENT_SINGLE' => array(1 => '//'),
  50      'COMMENT_MULTI' => array('/*' => '*/'),
  51      'COMMENT_REGEXP' => array(
  52          //Regular Expressions
  53          2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])*(?<!\s)\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(?<!\s)\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU"
  54          ),
  55      'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  56      'QUOTEMARKS' => array("'", '"'),
  57      'ESCAPE_CHAR' => '\\',
  58      'KEYWORDS' => array(
  59          1 => array(
  60              'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
  61              'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
  62              'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
  63              'while', 'write', 'with'
  64              ),
  65          2 => array(
  66              'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
  67              'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
  68              'protected', 'public', 'super', 'true', 'use', 'var'
  69              ),
  70          3 => array(
  71              // common functions for Window object
  72              'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home',
  73              'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
  74              'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status',
  75              'stop',
  76              )
  77          ),
  78      'SYMBOLS' => array(
  79          '(', ')', '[', ']', '{', '}',
  80          '+', '-', '*', '/', '%',
  81          '!', '@', '&', '|', '^',
  82          '<', '>', '=',
  83          ',', ';', '?', ':'
  84          ),
  85      'CASE_SENSITIVE' => array(
  86          GESHI_COMMENTS => false,
  87          1 => false,
  88          2 => false,
  89          3 => false
  90          ),
  91      'STYLES' => array(
  92          'KEYWORDS' => array(
  93              1 => 'color: #000066; font-weight: bold;',
  94              2 => 'color: #003366; font-weight: bold;',
  95              3 => 'color: #000066;'
  96              ),
  97          'COMMENTS' => array(
  98              1 => 'color: #006600; font-style: italic;',
  99              2 => 'color: #009966; font-style: italic;',
 100              'MULTI' => 'color: #006600; font-style: italic;'
 101              ),
 102          'ESCAPE_CHAR' => array(
 103              0 => 'color: #000099; font-weight: bold;'
 104              ),
 105          'BRACKETS' => array(
 106              0 => 'color: #009900;'
 107              ),
 108          'STRINGS' => array(
 109              0 => 'color: #3366CC;'
 110              ),
 111          'NUMBERS' => array(
 112              0 => 'color: #CC0000;'
 113              ),
 114          'METHODS' => array(
 115              1 => 'color: #660066;'
 116              ),
 117          'SYMBOLS' => array(
 118              0 => 'color: #339933;'
 119              ),
 120          'REGEXPS' => array(
 121              ),
 122          'SCRIPT' => array(
 123              0 => '',
 124              1 => '',
 125              2 => '',
 126              3 => ''
 127              )
 128          ),
 129      'URLS' => array(
 130          1 => '',
 131          2 => '',
 132          3 => ''
 133          ),
 134      'OOLANG' => true,
 135      'OBJECT_SPLITTERS' => array(
 136          1 => '.'
 137          ),
 138      'REGEXPS' => array(
 139          ),
 140      'STRICT_MODE_APPLIES' => GESHI_MAYBE,
 141      'SCRIPT_DELIMITERS' => array(
 142          0 => array(
 143              '<script type="text/javascript">' => '</script>'
 144              ),
 145          1 => array(
 146              '<script language="javascript">' => '</script>'
 147              )
 148          ),
 149      'HIGHLIGHT_STRICT_BLOCK' => array(
 150          0 => true,
 151          1 => true
 152          )
 153  );
 154  
 155  ?>


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1