<?php
/**
* Auto-generated class. JAVASCRIPT syntax highlighting
* @package Text_Highlighter
*
* @author Andrey Demenev <hide@address.com>
*/
/**
* @ignore
*/
require_once 'Text/Highlighter.php';
/**
* Auto-generated class. JAVASCRIPT syntax highlighting
*
*
* Custom color groups defined by this highlighter :
*
* builtin
*
* @author Andrey Demenev <hide@address.com>
* @package Text_Highlighter
*/
class Text_Highlighter_JAVASCRIPT extends Text_Highlighter
{ /**
* PHP4 Compatible Constructor
*
* @param array $options
* @access public
*/
function Text_Highlighter_JAVASCRIPT($options=array())
{
$this->__construct($options);
}
/**
* Constructor
*
* @param array $options
* @access public
*/
function __construct($options=array())
{
$this->_syntax = array (
'regions' =>
array (
'block' =>
array (
'name' => 'block',
'case' => true,
'innerColor' => 'code',
'delimColor' => 'brackets',
'start' => '/\\{/',
'end' => '/\\}/',
'remember' => false,
'lookfor' =>
array (
'regions' =>
array (
0 => 'block',
1 => 'brackets',
2 => 'sqbrackets',
3 => 'mlcomment',
4 => 'strdouble',
5 => 'strsingle',
6 => 'comment',
7 => 'regexp',
),
'blocks' =>
array (
0 => 'identifier',
1 => 'number',
),
),
),
'brackets' =>
array (
'name' => 'brackets',
'case' => true,
'innerColor' => 'code',
'delimColor' => 'brackets',
'start' => '/\\(/',
'end' => '/\\)/',
'remember' => false,
'lookfor' =>
array (
'regions' =>
array (
0 => 'block',
1 => 'brackets',
2 => 'sqbrackets',
3 => 'mlcomment',
4 => 'strdouble',
5 => 'strsingle',
6 => 'comment',
7 => 'regexp',
),
'blocks' =>
array (
0 => 'identifier',
1 => 'number',
),
),
),
'sqbrackets' =>
array (
'name' => 'sqbrackets',
'case' => true,
'innerColor' => 'code',
'delimColor' => 'brackets',
'start' => '/\\[/',
'end' => '/\\]/',
'remember' => false,
'lookfor' =>
array (
'regions' =>
array (
0 => 'block',
1 => 'brackets',
2 => 'sqbrackets',
3 => 'mlcomment',
4 => 'strdouble',
5 => 'strsingle',
6 => 'comment',
7 => 'regexp',
),
'blocks' =>
array (
0 => 'identifier',
1 => 'number',
),
),
),
'mlcomment' =>
array (
'name' => 'mlcomment',
'case' => true,
'innerColor' => 'comment',
'delimColor' => 'comment',
'start' => '/\\/\\*/',
'end' => '/\\*\\//',
'remember' => false,
'lookfor' =>
array (
'blocks' =>
array (
0 => 'url',
1 => 'email',
2 => 'note',
3 => 'cvstag',
),
),
),
'strdouble' =>
array (
'name' => 'strdouble',
'case' => true,
'innerColor' => 'string',
'delimColor' => 'quotes',
'start' => '/"/',
'end' => '/"/',
'remember' => false,
'lookfor' =>
array (
'blocks' =>
array (
0 => 'descaped',
),
),
),
'strsingle' =>
array (
'name' => 'strsingle',
'case' => true,
'innerColor' => 'string',
'delimColor' => 'quotes',
'start' => '/\'/',
'end' => '/\'/',
'remember' => false,
'lookfor' =>
array (
'blocks' =>
array (
0 => 'escaped',
),
),
),
'comment' =>
array (
'name' => 'comment',
'case' => true,
'innerColor' => 'comment',
'delimColor' => 'comment',
'start' => '/\\/\\//',
'end' => '/$/m',
'remember' => false,
'lookfor' =>
array (
'blocks' =>
array (
0 => 'url',
1 => 'email',
2 => 'note',
3 => 'cvstag',
),
),
),
'regexp' =>
array (
'name' => 'regexp',
'case' => true,
'innerColor' => 'string',
'delimColor' => 'quotes',
'start' => '/\\//',
'end' => '/\\/g?i?/',
'remember' => false,
'lookfor' =>
array (
'blocks' =>
array (
0 => 'reescaped',
),
),
),
),
'keywords' =>
array (
'builtin' =>
array (
'name' => 'builtin',
'innerColor' => 'builtin',
'case' => true,
'inherits' => 'identifier',
'match' =>
array (
'String' => true,
'Array' => true,
'RegExp' => true,
'Function' => true,
'Math' => true,
'Number' => true,
'Date' => true,
'Image' => true,
'window' => true,
'document' => true,
'navigator' => true,
'onAbort' => true,
'onBlur' => true,
'onChange' => true,
'onClick' => true,
'onDblClick' => true,
'onDragDrop' => true,
'onError' => true,
'onFocus' => true,
'onKeyDown' => true,
'onKeyPress' => true,
'onKeyUp' => true,
'onLoad' => true,
'onMouseDown' => true,
'onMouseOver' => true,
'onMouseOut' => true,
'onMouseMove' => true,
'onMouseUp' => true,
'onMove' => true,
'onReset' => true,
'onResize' => true,
'onSelect' => true,
'onSubmit' => true,
'onUnload' => true,
),
),
'reserved' =>
array (
'name' => 'reserved',
'innerColor' => 'reserved',
'case' => true,
'inherits' => 'identifier',
'match' =>
array (
'break' => true,
'continue' => true,
'do' => true,
'while' => true,
'export' => true,
'for' => true,
'in' => true,
'if' => true,
'else' => true,
'import' => true,
'return' => true,
'label' => true,
'switch' => true,
'case' => true,
'var' => true,
'with' => true,
'delete' => true,
'new' => true,
'this' => true,
'typeof' => true,
'void' => true,
'abstract' => true,
'boolean' => true,
'byte' => true,
'catch' => true,
'char' => true,
'class' => true,
'const' => true,
'debugger' => true,
'default' => true,
'double' => true,
'enum' => true,
'extends' => true,
'false' => true,
'final' => true,
'finally' => true,
'float' => true,
'function' => true,
'implements' => true,
'goto' => true,
'instanceof' => true,
'int' => true,
'interface' => true,
'long' => true,
'native' => true,
'null' => true,
'package' => true,
'private' => true,
'protected' => true,
'public' => true,
'short' => true,
'static' => true,
'super' => true,
'synchronized' => true,
'throw' => true,
'throws' => true,
'transient' => true,
'true' => true,
'try' => true,
'volatile' => true,
),
),
),
'blocks' =>
array (
'escaped' =>
array (
'name' => 'escaped',
'case' => true,
'innerColor' => 'special',
'match' => '/\\\\\\\\|\\\\"|\\\\\'|\\\\`/',
'multiline' => false,
),
'descaped' =>
array (
'name' => 'descaped',
'case' => true,
'innerColor' => 'special',
'match' => '/\\\\\\\\|\\\\"|\\\\\'|\\\\`|\\\\t|\\\\n|\\\\r/',
'multiline' => false,
),
'reescaped' =>
array (
'name' => 'reescaped',
'case' => true,
'innerColor' => 'special',
'match' => '/\\\\\\//',
'multiline' => false,
),
'identifier' =>
array (
'name' => 'identifier',
'case' => false,
'innerColor' => 'identifier',
'match' => '/[a-z_]\\w*/i',
'multiline' => false,
),
'number' =>
array (
'name' => 'number',
'case' => true,
'innerColor' => 'number',
'match' => '/\\d*\\.?\\d+/',
'multiline' => false,
),
'url' =>
array (
'name' => 'url',
'case' => true,
'innerColor' => 'url',
'match' => '/((https?|ftp):\\/\\/[\\w\\?\\.\\-\\&=\\/]+([^\\w\\?\\.\\&=\\/]|$))|(^|[\\s,!?])www\\.\\w+\\.\\w+[\\w\\?\\.\\&=\\/]*([^\\w\\?\\.\\&=\\/]|$)/',
'multiline' => false,
),
'email' =>
array (
'name' => 'email',
'case' => true,
'innerColor' => 'url',
'match' => '/\\w+[\\.\\w\\-]+@(\\w+[\\.\\w\\-])+/',
'multiline' => false,
),
'note' =>
array (
'name' => 'note',
'case' => false,
'innerColor' => 'inlinedoc',
'match' => '/\\b(note|fixme):/i',
'multiline' => false,
),
'cvstag' =>
array (
'name' => 'cvstag',
'case' => true,
'innerColor' => 'inlinedoc',
'match' => '/\\$\\w+:.+\\$/',
'multiline' => false,
),
),
'toplevel' =>
array (
'blocks' =>
array (
0 => 'identifier',
1 => 'number',
),
'regions' =>
array (
0 => 'block',
1 => 'brackets',
2 => 'sqbrackets',
3 => 'mlcomment',
4 => 'strdouble',
5 => 'strsingle',
6 => 'comment',
7 => 'regexp',
),
),
'case' => true,
'defcolor' => 'code',
);
parent::_init($options);
}
}
?>