/**
 * Code Syntax Highlighter for Objective-C
 * by Hironobu Koura <hironobu@foursics.jp>
 * 
 * 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.ObjC = function()
{
	var datatypes = 
        'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
        'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
        'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
        '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
        'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
        'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
        'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
        'va_list wchar_t wctrans_t wctype_t wint_t signed ' +
        'NSArray NSAttributedString NSDictionary NSFileWrapper NSFont NSImage NSMutableAttributedString NSParagraphStyle NSPasteboard NSRange NSSize NSString NSTextAttachment NSTextAttachmentCell NSURL ' +
        'NSLinkAttributeName ' +
        'CGFloat ' +
        'IBAction IBOutlet';

	var keywords = 
        'YES NO nil' +
        'if do for while ' +
        'BOOL id void ' +
        'return self super';

        var functions = 'NSLog';

	this.regexList = [
                { regex: SyntaxHighlighter.regexLib.singleLineCComments,        css: 'comment' },                       // one line comments
                { regex: SyntaxHighlighter.regexLib.multiLineCComments,         css: 'comment' },                       // multiline comments
		{ regex: new RegExp('@?"(?:\\.|(\\\\\\")|[^\\""])*"','g'),      css: 'string' },
                { regex: new RegExp('\\b[\\d\\.]+\\b', 'g'),			css: 'number' },
		{ regex: new RegExp('^ *#.*', 'gm'),                            css: 'preprocessor' },
		{ regex: new RegExp('^ *@.*', 'gm'),                            css: 'directives' },
		{ regex: new RegExp(this.getKeywords(datatypes), 'gm'),		css: 'color1 blod' },
                { regex: new RegExp(this.getKeywords(functions), 'gm'),         css: 'functions bold' },
		{ regex: new RegExp(this.getKeywords(keywords), 'gm'),		css: 'keyword' }
		];
}

SyntaxHighlighter.brushes.ObjC.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.ObjC.aliases   	= [ 'objc', 'objective-c', 'cocoa' ];

