/*
 * SyntaxHighlighter Brush for the Embarcadero Delphi Prism Oxygene compiler
 * Maintained by Ron Grove @ http://www.evanoah.com
 *
 * Updated 12/16/2009 for use with SyntaxHighlighter 2.1
 *
 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General 
 * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) 
 * any later version.
 *
 * This library 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 Lesser General Public License for more 
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to 
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
*/

SyntaxHighlighter.brushes.Oxygene=function()
{
	var datatypes=
	'Byte Boolean Char String WideChar WideString ShortInt Word SmallInt Integer Cardinal '+
	'LongWord Int64 UInt64 Single Double NativeInt NativeUnit Extended Real Pointer';
	
	var keywords=
	'and as assembly begin break case class const constructor continue '+
	'delegate div do downto else end ensure event except exit false finalizer finally '+ 
	'for forward function future if implementation in inherited interface invariants is '+
	'locking loop method mod module namespace new nil not nullable of old on operator '+
	'or out parllel private procedure property protected public raise record repeat require '+
	'result self set shl shr then to true try type unit until uses using var where while with '+
	'xor yield abstract add array of async default each empty enum external final finalizer '+
	'flags global has implements implies index inline iterator locked matching nested notify '+
	'override params partial pinned read readonly reintroduce remove sealed sequence of static '+
	'step unsafe virtual where write asc desc distinct equals from group by into join on '+
	'reverse select skip take';

	this.regexList=[
		{ regex: new RegExp('\\(\\*[\\s\\S]*?\\*\\)','gm'),css:'comment' },
		{ regex: new RegExp('{(?!\\$)[\\s\\S]*?}','gm'),css:'comment'},
		{ regex: dp.sh.RegexLib.SingleLineCComments,css:'comment'},
		{ regex: dp.sh.RegexLib.SingleQuotedString,css:'string'},
		{ regex: new RegExp('\\{\\$[a-zA-Z]+ .+\\}','g'),css:'directive'},
		{ regex: new RegExp('\\b[\\d\\.]+\\b','g'),css:'number'},
		{ regex: new RegExp('\\$[a-zA-Z0-9]+\\b','g'),css:'number'},
		{ regex: new RegExp(this.GetKeywords(datatypes), 'gm'),css: 'datatypes'},
		{ regex: new RegExp(this.GetKeywords(keywords),'gm'),css:'keyword'}
	];

	this.CssClass='dp-oxygene';
	this.Style='.dp-oxygene .number { color: blue; }'+
				'.dp-oxygene .directive { color: #008284; }'+
				'.dp-oxygene .vars { color: #000; }'+
				'.dp-oxygene .datatypes { color: #2E8B57; }';
}
SyntaxHighlighter.brushes.Oxygene.prototype = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Oxygene.Aliases = ['oxygene', 'prism', 'delphi-prism'];
