/**
 * TestComplete JScript, C++Script & C#Script brush for SyntaxHighlighter
 *
 * Copyright (C) 2009 AutomatedQA
 */
SyntaxHighlighter.brushes.JScript = function()
{
	var keywords =	'break case catch continue debugger default delete do else false finally for function i[fn] ' +
			'instanceof new null return switch this throw true try typeof var void while with';

	var functions = 'apply call (?:de|en)codeURI(?:Component)? (?:un)?escape eval GetObject is(?:Finite|NaN) ' +
			'parse(?:Float|Int) ScriptEngine(?:(?:Build|Major|Minor)Version)?';

	var objects = 	'RegExp Date String Number Math';

	var properties ='undefined NaN Infinity';

	var TCObjects = 'ActiveXObjects ADO Aliases AQtime AQtime[4-6] AQtimeIntegration aqConvert aqDateTime ' +
			'aqEnvironment aqFile aqFileSystem aqUtils aqObject aqString BDE BuiltIn Consts DB DBTables ' +
			'DbgServices DDT DebugAgent DLL dotNET Events Files HISUtils Indicator IssueTracking ' +
			'KeywordTests LLPlayer LoadTesting Log ManualTestBuilder NameMapping NetworkSuite Objects ' +
			'OCR ODT Options PDA Project ProjectSuite Regions Runner Self slAQtime slPacker Storages ' +
			'Stores Sys Tables TestedApps TestSuites UserForms Utils Win32API Win32Controls ' +
			'WinCELLCollection WinCETestedApps WebTesting WebServices XML';

	var TCFunctions = '(?:Mk|In)Set';

	this.regexList = [
		{ regex: SyntaxHighlighter.regexLib.singleLineCComments,	css: 'comments' },	// one line comments
		{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'comments' },	// multiline comments
		{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'string' },	// double quoted strings
		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },	// single quoted strings
		{ regex: new RegExp(this.getKeywords(keywords), 'g'),		css: 'keyword' },	// keywords
		{ regex: /(?:\b\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?\b/gi,		css: 'value' },		// numbers 12345
		{ regex: /\b0x[a-z\d]+\b/gi,					css: 'value' },		// numbers 0xF5D3
		{ regex: new RegExp(this.getKeywords(functions), 'g'),		css: 'functions' },	// functions
		{ regex: new RegExp(this.getKeywords(objects), 'g'),		css: 'variable' },	// objects
		{ regex: new RegExp(this.getKeywords(properties), 'g'),		css: 'constants' },	// global properties
		{ regex: new RegExp(this.getKeywords(TCObjects), 'g'),		css: 'functions' },	// TestComplete global objects
		{ regex: new RegExp(this.getKeywords(TCFunctions), 'g'),	css: 'functions' }	// TestComplete global functions
	];
};

SyntaxHighlighter.brushes.JScript.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.JScript.aliases	= ['jscript', 'js', 'cscript', 'cppscript', 'csharpscript'];

