38 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
40 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
39 * |
41 * |
40 ************************************************************************************/ |
42 ************************************************************************************/ |
41 |
43 |
42 $language_data = array ( |
44 $language_data = array ( |
43 'LANG_NAME' => 'Javascript', |
45 'LANG_NAME' => 'Javascript', |
44 'COMMENT_SINGLE' => array(1 => '//'), |
46 'COMMENT_SINGLE' => array(1 => '//'), |
45 'COMMENT_MULTI' => array('/*' => '*/'), |
47 'COMMENT_MULTI' => array('/*' => '*/'), |
46 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
48 //Regular Expressions |
47 'QUOTEMARKS' => array("'", '"'), |
49 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), |
48 'ESCAPE_CHAR' => '\\', |
50 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
49 'KEYWORDS' => array( |
51 'QUOTEMARKS' => array("'", '"'), |
50 1 => array( |
52 'ESCAPE_CHAR' => '\\', |
51 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', |
|
52 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', |
|
53 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', |
|
54 'while', 'write', 'with' |
|
55 ), |
|
56 2 => array( |
|
57 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', |
|
58 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', |
|
59 'protected', 'public', 'super', 'true', 'use', 'var' |
|
60 ), |
|
61 3 => array( |
|
62 |
|
63 // common functions for Window object |
|
64 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home', |
|
65 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', |
|
66 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status', |
|
67 'stop', |
|
68 ) |
|
69 ), |
|
70 'SYMBOLS' => array( |
|
71 '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' |
|
72 ), |
|
73 'CASE_SENSITIVE' => array( |
|
74 GESHI_COMMENTS => false, |
|
75 1 => false, |
|
76 2 => false, |
|
77 3 => false |
|
78 ), |
|
79 'STYLES' => array( |
|
80 'KEYWORDS' => array( |
53 'KEYWORDS' => array( |
81 1 => 'color: #000066; font-weight: bold;', |
54 1 => array( |
82 2 => 'color: #003366; font-weight: bold;', |
55 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', |
83 3 => 'color: #000066;' |
56 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', |
84 ), |
57 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', |
85 'COMMENTS' => array( |
58 'while', 'write', 'with' |
86 1 => 'color: #009900; font-style: italic;', |
59 ), |
87 'MULTI' => 'color: #009900; font-style: italic;' |
60 2 => array( |
88 ), |
61 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', |
89 'ESCAPE_CHAR' => array( |
62 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', |
90 0 => 'color: #000099; font-weight: bold;' |
63 'protected', 'public', 'super', 'true', 'use', 'var' |
91 ), |
64 ), |
92 'BRACKETS' => array( |
65 3 => array( |
93 0 => 'color: #66cc66;' |
66 // common functions for Window object |
94 ), |
67 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home', |
95 'STRINGS' => array( |
68 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', |
96 0 => 'color: #3366CC;' |
69 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status', |
97 ), |
70 'stop', |
98 'NUMBERS' => array( |
71 ) |
99 0 => 'color: #CC0000;' |
72 ), |
100 ), |
|
101 'METHODS' => array( |
|
102 1 => 'color: #006600;' |
|
103 ), |
|
104 'SYMBOLS' => array( |
73 'SYMBOLS' => array( |
105 0 => 'color: #66cc66;' |
74 '(', ')', '[', ']', '{', '}', |
106 ), |
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 ), |
107 'REGEXPS' => array( |
133 'REGEXPS' => array( |
108 0 => 'color: #0066FF;' |
134 ), |
109 ), |
135 'STRICT_MODE_APPLIES' => GESHI_MAYBE, |
110 'SCRIPT' => array( |
136 'SCRIPT_DELIMITERS' => array( |
111 0 => '', |
137 0 => array( |
112 1 => '', |
138 '<script type="text/javascript">' => '</script>' |
113 2 => '', |
139 ), |
114 3 => '' |
140 1 => array( |
115 ) |
141 '<script language="javascript">' => '</script>' |
116 ), |
142 ) |
117 'URLS' => array( |
143 ), |
118 1 => '', |
144 'HIGHLIGHT_STRICT_BLOCK' => array( |
119 2 => '', |
145 0 => true, |
120 3 => '' |
146 1 => true |
121 ), |
147 ) |
122 'OOLANG' => true, |
|
123 'OBJECT_SPLITTERS' => array( |
|
124 1 => '.' |
|
125 ), |
|
126 'REGEXPS' => array( |
|
127 0 => "/.*/([igm]*)?" // matches js reg exps |
|
128 ), |
|
129 'STRICT_MODE_APPLIES' => GESHI_MAYBE, |
|
130 'SCRIPT_DELIMITERS' => array( |
|
131 0 => array( |
|
132 '<script type="text/javascript">' => '</script>' |
|
133 ), |
|
134 1 => array( |
|
135 '<script language="javascript">' => '</script>' |
|
136 ) |
|
137 ), |
|
138 'HIGHLIGHT_STRICT_BLOCK' => array( |
|
139 0 => true, |
|
140 1 => true |
|
141 ) |
|
142 ); |
148 ); |
143 |
149 |
144 ?> |
150 ?> |