PageSourceSearch

https://www.oauth.com/wp-content/plugins/syntaxhighlighter/third-party-brushes/shBrushObjC.js?ver=20091207

js oauth.com collected 2026-09-24 07:32:57 UTC 2,374 bytes, 49 lines download raw bytes

1/**
2 * Wordpress SyntaxHighlighter brush for Objective-C
3 * By Matej Bukovinski, www.bukovinski.com
4 *
5 * Copyright (C) 2009 Matej Bukovinski
6 * 
7 * Adapted from:
8 * SyntaxHighlighter - Objective-C Brush, version 1.0.0
9 * http://codepirate.seaandco.com/
10 * Copyright (C) 2009 Geoffrey Byers.
11 * 
12 * Licensed under a GNU Lesser General Public License.
13 * http://creativecommons.org/licenses/LGPL/2.1/
14 * 
15 */
16
17SyntaxHighlighter.brushes.ObjC = function() {
18	
19	var datatypes =	'char bool BOOL double float int long short id void';
20	
21	var keywords = 'IBAction IBOutlet SEL YES NO readwrite readonly nonatomic nil NULL ';
22	keywords += 'super self copy ';
23	keywords += 'break case catch class const copy __finally __exception __try ';
24	keywords += 'const_cast continue private public protected __declspec ';
25	keywords += 'default delete deprecated dllexport dllimport do dynamic_cast ';
26	keywords += 'else enum explicit extern if for friend goto inline ';
27	keywords += 'mutable naked namespace new noinline noreturn nothrow ';
28	keywords += 'register reinterpret_cast return selectany ';
29	keywords += 'sizeof static static_cast struct switch template this ';
30	keywords += 'thread throw true false try typedef typeid typename union ';
31	keywords += 'using uuid virtual volatile whcar_t while';
32	
33	this.regexList = [
34		{ regex: SyntaxHighlighter.regexLib.singleLineCComments,	css: 'comment' },		// one line comments
35		{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'comment' },		// multiline comments
36		{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'string' },		// double quoted strings
37		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },		// single quoted strings
38		{ regex: new RegExp('^ *#.*', 'gm'),						css: 'preprocessor' },	// preprocessor
39		{ regex: new RegExp(this.getKeywords(datatypes), 'gm'),		css: 'datatypes' },		// datatypes
40		{ regex: new RegExp(this.getKeywords(keywords), 'gm'),		css: 'keyword' },		// keyword
41		{ regex: new RegExp('\\bNS\\w+\\b', 'g'),					css: 'keyword' },		// keyword
42		{ regex: new RegExp('@\\w+\\b', 'g'),						css: 'keyword' },		// keyword
43		{ regex: new RegExp('@"(?:\\.|(\\\\\\")|[^\\""\\n])*"', 'g'),	css: 'string' }	// objc string		
44		];
45	
46}
47
48SyntaxHighlighter.brushes.ObjC.prototype = new SyntaxHighlighter.Highlighter();
49SyntaxHighlighter.brushes.ObjC.aliases = ['objc', 'obj-c'];

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.