Issue #789 resolved

Objective-C lexer thrown off by ellipsis

dmishe
created an issue

At least that's my assumption, see example here https://github.com/RestKit/RestKit/blob/master/Code/ObjectMapping/RKObjectMapping.m#L204

Github guys told me to open an issue here :)

Comments (5)

  1. Tim Hatch

    Agreed, it's an issue. Something like

    diff -r 913a59849ec1 pygments/lexers/compiled.py
    --- a/pygments/lexers/compiled.py	Tue Aug 28 08:23:44 2012 -0700
    +++ b/pygments/lexers/compiled.py	Tue Aug 28 10:09:32 2012 -0700
    @@ -1226,6 +1226,8 @@
             ],
             'method': [
                 include('whitespace'),
    +            (r',', Punctuation),
    +            (r'\.\.\.', Punctuation),
                 (r'(\(.*?\))([a-zA-Z$_][a-zA-Z0-9$_]*)', bygroups(using(this),
                                                                   Name.Variable)),
                 (r'[a-zA-Z$_][a-zA-Z0-9$_]*:', Name.Function),
    

    fixes it, but I'm not sure if "..." (or for that matter, ",") is allowed elsewhere. The Objective C lexer is very strict by Pygments standards.

  2. Log in to comment