Add a lexer for the Logos language.

#130 Declined
  1. Dustin Howett

Logos is a transcompiler that adds an additional layer on top of Objective-C which allows for easy replacement of methods at runtime. This lexer adds support for all existing Logos directives. The LogosLexer is based wholly on ObjectiveCLexer (as I could not get a DelegationLexer to work properly.) An example of Logos syntax is included.

Comments (7)

  1. Daniel Ferreira


    As a developer of MobileSubstrate extensions ("tweaks") for jailbroken i[Phone|Pad|Pod]s – a development category where Logos is very widespread as a mechanism for easy/fast code generation of function interposing code –, I honestly would very much like to see this accepted, since:

    • I often look at opensource "tweaks" on GitHub's web interface, and it'd make code a lot more readable.

    • It would allow me to have a brief look at opensource "tweaks" in more detail with GitHub's "Explore... Languages" feature.

    Of course I go against hurting Pygments' source tree with a non-conformant-to-standards lexer, yet could you point out any reason this is not being accepted, so maybe it can be fixed?

  2. Tim Hatch

    Sorry for the delayed response, my energy has been focused on getting a release out before looking at new pull requests. I don't see any obvious blockers, and regexlint says it's OK. I think your _ws1 pattern is supposed to have some parens though.

  3. Alastair Houghton

    You probably want to take a look at my pull request #141 before merging this. Dustin’s code would be very much simpler after my changes, because he’d only have to write deltas against the Objective-C lexer; we’re talking a three-figure difference in line count, so it’s worth considering merging 141 first and then updating this code.

  4. Dustin Howett author

    Tim: Thank you! I'll give it a look-over as well - currently, _ws1 was stolen from Objective-C - like most of the rest of the lexer. This is non-ideal, and is addressed by Alastair's pull request.

    I'm willing to sit on this and reimplement it on top of Alastair's work, assuming it gets merged in.