summaryrefslogtreecommitdiff
path: root/pygments/lexers/compiled.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-04-14 20:20:50 -0400
committerTim Hatch <tim@timhatch.com>2014-04-14 20:20:50 -0400
commit9e64dcd5115ef3daa1ed923fb2f99d1bfa0df9df (patch)
treec766f99ce92e44e6725def32cac93029964778ff /pygments/lexers/compiled.py
parenta26518b3a05c107c2d29b8a54e6bf3ac542aaf68 (diff)
parent68442d00f2a26d4dcdc1c711405ca9939343bb34 (diff)
downloadpygments-9e64dcd5115ef3daa1ed923fb2f99d1bfa0df9df.tar.gz
Merged in jaingaurav2/pygments-main (pull request #307)
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r--pygments/lexers/compiled.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 103a9be5..947282dd 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -1411,12 +1411,18 @@ def objective(baselexer):
],
'oc_classname' : [
# interface definition that inherits
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*:\s*)([a-zA-Z$_][a-zA-Z0-9$_]*)?(\s*)({)',
+ bygroups(Name.Class, Text, Name.Class, Text, Punctuation), ('#pop', 'oc_ivars')),
('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*:\s*)([a-zA-Z$_][a-zA-Z0-9$_]*)?',
bygroups(Name.Class, Text, Name.Class), '#pop'),
# interface definition for a category
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*)(\([a-zA-Z$_][a-zA-Z0-9$_]*\))(\s*)({)',
+ bygroups(Name.Class, Text, Name.Label, Text, Punctuation), ('#pop', 'oc_ivars')),
('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*)(\([a-zA-Z$_][a-zA-Z0-9$_]*\))',
bygroups(Name.Class, Text, Name.Label), '#pop'),
# simple interface / implementation
+ ('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*)({)',
+ bygroups(Name.Class, Text, Punctuation), ('#pop', 'oc_ivars')),
('([a-zA-Z$_][a-zA-Z0-9$_]*)', Name.Class, '#pop')
],
'oc_forward_classname' : [
@@ -1425,6 +1431,13 @@ def objective(baselexer):
('([a-zA-Z$_][a-zA-Z0-9$_]*)(\s*;?)',
bygroups(Name.Class, Text), '#pop')
],
+ 'oc_ivars' : [
+ include('whitespace'),
+ include('statements'),
+ (';', Punctuation),
+ ('{', Punctuation, '#push'),
+ ('}', Punctuation, '#pop'),
+ ],
'root': [
# methods
(r'^([-+])(\s*)' # method marker