0

Update to 7.1

This commit is contained in:
Rei
2012-08-14 22:13:27 +08:00
parent c48a19bb3f
commit 7d6da30689
84 changed files with 4179 additions and 2385 deletions

View File

@@ -1,38 +1,35 @@
/*
Language: Objective C
Author: Valerii Hiora <valerii.hiora@gmail.com>
Contributors: Angel G. Olloqui <angelgarcia.mail@gmail.com>
*/
hljs.LANGUAGES.objectivec = function(){
hljs.LANGUAGES['objectivec'] = function(hljs) {
var OBJC_KEYWORDS = {
'keyword': {
'false': 1, 'int': 1, 'float': 1, 'while': 1, 'private': 1, 'char': 1,
'catch': 1, 'export': 1, 'sizeof': 2, 'typedef': 2, 'const': 1,
'struct': 1, 'for': 1, 'union': 1, 'unsigned': 1, 'long': 1,
'volatile': 2, 'static': 1, 'protected': 1, 'bool': 1, 'mutable': 1,
'if': 1, 'public': 1, 'do': 1, 'return': 1, 'goto': 1, 'void': 2,
'enum': 1, 'else': 1, 'break': 1, 'extern': 1, 'true': 1, 'class': 1,
'asm': 1, 'case': 1, 'short': 1, 'default': 1, 'double': 1, 'throw': 1,
'register': 1, 'explicit': 1, 'signed': 1, 'typename': 1, 'try': 1,
'this': 1, 'switch': 1, 'continue': 1, 'wchar_t': 1, 'inline': 1,
'readonly': 1, 'assign': 1, 'property': 1, 'protocol': 10, 'self': 1,
'synchronized': 1, 'end': 1, 'synthesize': 50, 'id': 1, 'optional': 1,
'required': 1, 'implementation': 10, 'nonatomic': 1,'interface': 1,
'super': 1, 'unichar': 1, 'finally': 2, 'dynamic': 2, 'nil': 1
},
'built_in': {
'YES': 5, 'NO': 5, 'NULL': 1, 'IBOutlet': 50, 'IBAction': 50,
'NSString': 50, 'NSDictionary': 50, 'CGRect': 50, 'CGPoint': 50,
'NSRange': 50, 'release': 1, 'retain': 1, 'autorelease': 50,
'UIButton': 50, 'UILabel': 50, 'UITextView': 50, 'UIWebView': 50,
'MKMapView': 50, 'UISegmentedControl': 50, 'NSObject': 50,
'UITableViewDelegate': 50, 'UITableViewDataSource': 50, 'NSThread': 50,
'UIActivityIndicator': 50, 'UITabbar': 50, 'UIToolBar': 50,
'UIBarButtonItem': 50, 'UIImageView': 50, 'NSAutoreleasePool': 50,
'UITableView': 50, 'BOOL': 1, 'NSInteger': 20, 'CGFloat': 20,
'NSException': 50, 'NSLog': 50, 'NSMutableString': 50,
'NSMutableArray': 50, 'NSMutableDictionary': 50, 'NSURL': 50
}
keyword:
'int float while private char catch export sizeof typedef const struct for union ' +
'unsigned long volatile static protected bool mutable if public do return goto void ' +
'enum else break extern class asm case short default double throw register explicit ' +
'signed typename try this switch continue wchar_t inline readonly assign property ' +
'protocol self synchronized end synthesize id optional required implementation ' +
'nonatomic interface super unichar finally dynamic IBOutlet IBAction selector strong ' +
'weak readonly',
literal:
'false true FALSE TRUE nil YES NO NULL',
built_in:
'NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView ' +
'UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread ' +
'UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool ' +
'UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray ' +
'NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController ' +
'UINavigationBar UINavigationController UITabBarController UIPopoverController ' +
'UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController ' +
'NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor ' +
'UIFont UIApplication NSNotFound NSNotificationCenter NSNotification ' +
'UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar ' +
'NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection class ' +
'UIInterfaceOrientation MPMoviePlayerController dispatch_once_t ' +
'dispatch_queue_t dispatch_sync dispatch_async dispatch_once'
};
return {
defaultMode: {
@@ -74,21 +71,20 @@ hljs.LANGUAGES.objectivec = function(){
},
{
className: 'class',
begin: 'interface|class|protocol|implementation',
beginWithKeyword: true,
end: '({|$)',
keywords: {
'interface': 1,
'class': 1,
'protocol': 5,
'implementation': 5
},
keywords: 'interface class protocol implementation',
contains: [{
className: 'id',
begin: hljs.UNDERSCORE_IDENT_RE
}
]
},
{
className: 'variable',
begin: '\\.'+hljs.UNDERSCORE_IDENT_RE
}
]
}
};
}();
}(hljs);