Closed msanders closed 6 years ago
Thank you for the PR. I will review this on the weekends.
Here is a test file https://gist.github.com/taku0/21fd1c4f6eeda75d951067f48d6948e9.
Thanks @taku0! Foundation types were generated using this script against the Foundation header copy-pasted from Xcode (jump to definition on import Foundation
). It unfortunately only includes native Swift types, not the bridged classes. Not sure how to generate those without parsing the Objective-C headers. TextMate's regexes were expanded using the following in Python:
print("'({})".format(" ".join('"{}"'.format(x) for x in exrex.generate(pattern))))
All looks good. Could you squash commits, then I will merge it. Thank you!
Done 👍
This brings swift-mode's highlighting for built-ins up to par with TextMate’s Swift bundle.
I’ve converted the regexes pertaining to built-ins from there for Swift 3 and up using pcre2el.I've expanded the keyword regexes from there using
exrex.generate
in Python and applied them usingregexpt-opt
.