source: documentation/trunk/packages/dokuwiki-2011-05-25a/inc/geshi/javascript.php@ 25027

Last change on this file since 25027 was 25027, checked in by jmt12, 12 years ago

Adding the packages directory, and within it a configured version of dokuwiki all ready to run

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