blob: c4995a6f8d3cfb309c4e06d53f99b1b2980ea913 [file] [log] [blame]
Swift Pygments Lexer
This is a hideous attempt to provide Pygments lexers for parsing both Swift and Swift REPL code listings. They are specifically tailored for code in the white paper.
The code is designed to be completely rewritten when someone has some free time. No programmers were hurt in the making of these lexers, but Python and Regular Expressions suffered grave losses.
**You don't need to install this file to use it with Sphinx** provided
you use a monkeypatch like the one in this project's docs/
Otherwise, in order to be made available to Pygments, you need to copy
the included `` file and run the Pygments `` config
You'll need to find out the path to your Pygments install. For me, this was:
To find it:
$ cd /Library/Python
$ find . -name lexers
Copy the `` file to this directory.
Execute the Pygments config script:
$ python
For pure Swift code use the `swift` lexer, for REPL use `swift-console`.
The white paper is already marked up to use the Swift lexers.