Home

Awesome

Swift language grammar

Swift.tmLanguage is a TextMate language grammar for the Swift programming language. It defines regex-based parsing rules so that code renderers can highlight Swift code using a semantic color scheme.

<img width="462" alt="image" src="https://github.com/jtbandes/swift-tmlanguage/assets/14237/b1fae934-f510-4f5d-a9eb-ec6fc9cca7f0">

This grammar is used for syntax highlighting by:

(It was also used by GitHub Linguist until 2024.)

The language grammar is available in three formats:

Development

Maintenance status

The Swift grammar was developed for years at textmate/swift.tmbundle, which is no longer actively maintained. Development of the grammar continues here.

This grammar is maintained by @jtbandes as a passion project. If you'd like to support past and future development, please consider making a donation. 💖

License

This project is licensed under the terms of the MIT license.