<?xml version="1.0" encoding="UTF-8" ?>
<!--
		Bluefish HTML Editor
		all-javascript.bfinc $Revision: 4947 $
 
		Copyright (C) 2008-2009 Olivier Sessink

		This program is free software; you can redistribute it and/or modify
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 2 of the License, or
		(at your option) any later version.

		This program is distributed in the hope that it will be useful,
		but WITHOUT ANY WARRANTY; without even the implied warranty of
		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
		GNU General Public License for more details.

		You should have received a copy of the GNU General Public License
		along with this program; if not, write to the Free Software
		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.		
-->

<element pattern="(" id="js(" starts_block="1" highlight="js-brackets" />
<element pattern=")" highlight="js-brackets" ends_block="1" blockstartelement="js(" />
<element pattern="{" id="js{" starts_block="1" highlight="js-brackets" />
<element pattern="}" highlight="js-brackets" ends_block="1" blockstartelement="js{" />
<element pattern="[" id="js[" starts_block="1" highlight="js-brackets" />
<element pattern="]" highlight="js-brackets" ends_block="1" blockstartelement="js[" />
<!-- JavaScript Keywords -->
<group highlight="js-keyword" autocomplete="1">
	<element pattern="break" />
	<element pattern="case" />
	<element pattern="catch" />
	<element pattern="continue" />
	<element pattern="default" />
	<element pattern="delete" />
	<element pattern="do" />
	<element pattern="else" />
	<element pattern="finally" />
	<element pattern="for" />
	<element pattern="function" />
	<element pattern="if" />
	<element pattern="in" />
	<element pattern="instanceof" />
	<element pattern="new" />
	<element pattern="return" />
	<element pattern="switch" />
	<element pattern="this" />
	<element pattern="throw" />
	<element pattern="try" />
	<element pattern="var" />
	<element pattern="void" />
	<element pattern="while" />
	<element pattern="with" />
</group>
<!-- ECMA-262 reserved words -->
<group highlight="js-keyword" autocomplete="1">
	<element pattern="abstract" />
	<element pattern="boolean" />
	<element pattern="byte" />
	<element pattern="char" />
	<element pattern="class" />
	<element pattern="const" />
	<element pattern="debugger" />
	<element pattern="double" />
	<element pattern="enum" />
	<element pattern="export" />
	<element pattern="extends" />
	<element pattern="final" />
	<element pattern="float" />
	<element pattern="goto" />
	<element pattern="implements" />
	<element pattern="import" />
	<element pattern="int" />
	<element pattern="interface" />
	<element pattern="long" />
	<element pattern="native" />
	<element pattern="package" />
	<element pattern="private" />
	<element pattern="protected" />
	<element pattern="public" />
	<element pattern="short" />
	<element pattern="static" />
	<element pattern="super" />
	<element pattern="synchronized" />
	<element pattern="throws" />
	<element pattern="transient" />
	<element pattern="volatile" />
</group>
<group highlight="js-function" autocomplete="1">
	<element pattern="abs"/>
	<element pattern="acos"/>
	<element pattern="apply"/>
	<element pattern="asin"/>
	<element pattern="atan"/>
	<element pattern="atan2"/>
	<element pattern="call"/>
	<element pattern="ceil"/>
	<element pattern="charAt"/>
	<element pattern="charCodeAt"/>
	<element pattern="concat"/>
	<element pattern="cos"/>
	<element pattern="decodeURI"/>
	<element pattern="decodeURIComponent"/>
	<element pattern="encodeURI"/>
	<element pattern="encodeURIComponent"/>
	<element pattern="escape"/>
	<element pattern="eval"/>
	<element pattern="exec"/>
	<element pattern="exp"/>
	<element pattern="floor"/>
	<element pattern="fromCharCode"/>
	<element pattern="getDate"/>
	<element pattern="getDay"/>
	<element pattern="getFullYear"/>
	<element pattern="getHours"/>
	<element pattern="getMilliseconds"/>
	<element pattern="getMinutes"/>
	<element pattern="getMonth"/>
	<element pattern="getSeconds"/>
	<element pattern="getTime"/>
	<element pattern="getTimezoneOffset"/>
	<element pattern="getUTCDate"/>
	<element pattern="getUTCDay"/>
	<element pattern="getUTCFullYear"/>
	<element pattern="getUTCHours"/>
	<element pattern="getUTCMilliseconds"/>
	<element pattern="getUTCMinutes"/>
	<element pattern="getUTCMonth"/>
	<element pattern="getUTCSeconds"/>
	<element pattern="getYear"/>
	<element pattern="hasOwnProperty"/>
	<element pattern="indexOf"/>
	<element pattern="isFinite"/>
	<element pattern="isNaN"/>
	<element pattern="isPrototypeOf"/>
	<element pattern="join"/>
	<element pattern="lastIndexOf"/>
	<element pattern="localeCompare"/>
	<element pattern="log"/>
	<element pattern="match"/>
	<element pattern="max"/>
	<element pattern="min"/>
	<element pattern="parse"/>
	<element pattern="parseFloat"/>
	<element pattern="parseInt"/>
	<element pattern="pop"/>
	<element pattern="pow"/>
	<element pattern="propertyIsEnumerable"/>
	<element pattern="push"/>
	<element pattern="random"/>
	<element pattern="replace"/>
	<element pattern="reverse"/>
	<element pattern="round"/>
	<element pattern="search"/>
	<element pattern="setDate"/>
	<element pattern="setFullYear"/>
	<element pattern="setHours"/>
	<element pattern="setMilliseconds"/>
	<element pattern="setMinutes"/>
	<element pattern="setMonth"/>
	<element pattern="setSeconds"/>
	<element pattern="setTime"/>
	<element pattern="setUTCDate"/>
	<element pattern="setUTCFullYear"/>
	<element pattern="setUTCHours"/>
	<element pattern="setUTCMilliseconds"/>
	<element pattern="setUTCMinutes"/>
	<element pattern="setUTCMonth"/>
	<element pattern="setUTCSeconds"/>
	<element pattern="setYear"/>
	<element pattern="shift"/>
	<element pattern="sin"/>
	<element pattern="slice"/>
	<element pattern="sort"/>
	<element pattern="split"/>
	<element pattern="sqrt"/>
	<element pattern="substr"/>
	<element pattern="substring"/>
	<element pattern="tan"/>
	<element pattern="toDateString"/>
	<element pattern="toExponential"/>
	<element pattern="toFixed"/>
	<element pattern="toGMTString"/>
	<element pattern="toLocaleDateString"/>
	<element pattern="toLocaleLowerCase"/>
	<element pattern="toLocaleString"/>
	<element pattern="toLocaleString"/>
	<element pattern="toLocaleTimeString"/>
	<element pattern="toLocaleUpperCase"/>
	<element pattern="toLowerCase"/>
	<element pattern="toPrecision"/>
	<element pattern="toString"/>
	<element pattern="toTimeString"/>
	<element pattern="toUpperCase"/>
	<element pattern="toUTCString"/>
	<element pattern="unescape"/>
	<element pattern="unshift"/>
	<element pattern="UTC"/>
	<element pattern="valueOf"/>
	<group class="javascript_window_functions" highlight="js-function" autocomplete="1">
		<group highlight="js-property">
			<element pattern="closed"/>
			<element pattern="defaultStatus"/>
			<element pattern="innerHeight"/>
			<element pattern="innerWidth"/>
			<element pattern="locationbar"/>
			<element pattern="menubar"/>
			<element pattern="name"/>
			<element pattern="outerHeight"/>
			<element pattern="outerWidth"/>
			<element pattern="pageXOffset"/>
			<element pattern="pageYOffset"/>
			<element pattern="personalbar"/>
			<element pattern="scrollbars"/>
			<element pattern="status"/>
			<element pattern="statusbar"/>
			<element pattern="toolbar"/>
		</group>
		<element pattern="alert"/>
		<element pattern="back"/>
		<element pattern="blur"/>
		<element pattern="captureEvents"/>
		<element pattern="clearInterval"/>
		<element pattern="clearTimeout"/>
		<element pattern="close"/>
		<element pattern="confirm"/>
		<element pattern="disableExternalCapture"/>
		<element pattern="enableExternalCapture"/>
		<element pattern="find"/>
		<element pattern="focus"/>
		<element pattern="forward"/>
		<element pattern="handleEvent"/>
		<element pattern="home"/>
		<element pattern="moveBy"/>
		<element pattern="moveTo"/>
		<element pattern="open"/>
		<element pattern="print"/>
		<element pattern="prompt"/>
		<element pattern="releaseEvents"/>
		<element pattern="resizeBy"/>
		<element pattern="resizeTo"/>
		<element pattern="routeEvent"/>
		<element pattern="scrollBy"/>
		<element pattern="scrollTo"/>
		<element pattern="setInterval"/>
		<element pattern="setTimeout"/>
		<element pattern="stop"/>
		<group class="javascript_document_functions" highlight="js-function" autocomplete="1">
			<group highlight="js-property">
				<element pattern="alinkColor"/>
				<element pattern="bgColor"/>
				<element pattern="charset"/>
				<element pattern="cookie"/>
				<element pattern="defaultCharset"/>
				<element pattern="fgColor"/>
				<element pattern="lastModified"/>
				<element pattern="linkColor"/>
				<element pattern="referrer"/>
				<element pattern="title"/>
				<element pattern="URL"/>
				<element pattern="vlinkColor"/>
			</group>
			<element pattern="captureEvents"/>
			<element pattern="close"/>
			<element pattern="createAttribute"/>
			<element pattern="createElement"/>
			<element pattern="createTextNode"/>
			<element pattern="getElementById" />
			<element pattern="getElementsByName"/>
			<element pattern="getElementsByTagName" />
			<element pattern="getSelection"/>
			<element pattern="handleEvent"/>
			<element pattern="open"/>
			<element pattern="releaseEvents"/>
			<element pattern="routeEvents"/>
			<element pattern="write"/>
			<element pattern="writeIn"/>
		</group>
	</group>
</group>
<!-- JavaScript Objects -->
<group highlight="js-type" autocomplete="1">
	<element pattern="Array"/>
	<element pattern="Boolean"/>
	<element pattern="Date"/>
	<element pattern="Error"/>
	<element pattern="EvalError"/>
	<element pattern="Function"/>
	<element pattern="Number"/>
	<element pattern="Object"/>
	<element pattern="RangeError"/>
	<element pattern="RegExp"/>
	<element pattern="String"/>
	<element pattern="SyntaxError"/>
	<element pattern="TypeError"/>
	<element pattern="URIError"/>
</group>
<!-- These objects appear to be case insensitive -->
<group highlight="js-variable" autocomplete="1">
	<element pattern="document"/>
	<element pattern="global"/>
	<element pattern="window"/>
</group>

<group highlight="js-value" autocomplete="1">
	<element pattern="true" />
	<element pattern="false" />
	<element pattern="null" />
	<element pattern="NaN" />
	<element pattern="Infinity" />
	<!-- having [.-]?[0-9]+ as a value pattern has an unwanted side 
	effect: the . is matching a patterns and is not seen as a symbol anymore
	such that substr in w.substr() is not detected anymore	-->
	<element pattern="[0-9]+" is_regex="1" autocomplete="0"/>
	<element pattern="[0-9]+\.[0-9]*" is_regex="1" autocomplete="0"/>
</group>
<!--this pattern more or less colors everything, so I rmeoved it. -->
<!--<element pattern="[a-zA-Z_][a-zA-Z_0-9]*" is_regex="1" highlight="js-variable"/>-->
<element pattern="&#34;" highlight="js-string">
	<context symbols="\&#34;" highlight="js-string">
		<element pattern="\&#34;" highlight="js-string" />
		<element pattern="&#34;" highlight="js-string" ends_context="1" />
	</context>
</element>
<element pattern="'" highlight="js-string">
	<context symbols="\'" highlight="js-string">
		<element pattern="\." is_regex="1" highlight="js-string" />
		<element pattern="'" highlight="js-string" ends_context="1" />
	</context>
</element>
<element id="js//" pattern="//" highlight="js-comment">
	<context symbols="&#10;&#13;&gt;&lt; " highlight="js-comment">
		<element pattern="[&#10;&#13;]" is_regex="1" highlight="js-comment" ends_context="1" />
		<element pattern="&lt;/script&gt;" case_insens="1" highlight="tag" ends_context="3" ends_block="1" blockstartelement="script"/>
	</context>
</element>
<element id="js/*" pattern="/*" starts_block="1" highlight="js-comment">
	<context symbols="*/&#9;&#10;&#13;&gt;&lt; " highlight="js-comment">
		<element pattern="*/" ends_block="1" blockstartelement="js/*" highlight="js-comment" mayfold="1" ends_context="1" />
		<element pattern="&lt;/script&gt;" case_insens="1" highlight="tag" ends_context="3" ends_block="1" blockstartelement="script"/>
	</context>
</element>
