textmate / swift.tmbundle

TextMate support for Swift
72 stars 30 forks source link

Add #filePath to variables list #42

Closed BalestraPatrick closed 4 years ago

BalestraPatrick commented 4 years ago

This PR adds the new #filePath variable that was added in Swift 5.3. I noticed that GitHub doesn't syntax highlight it at all right now, so hopefully this should fix it.

Swift evolution proposal for reference: https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md

I'm not sure if we should add __FILE_NAME__ but the proposals mentions its existence at the bottom (even though it's rarely used), so I can remove it if you think it shouldn't be added.

jtbandes commented 4 years ago

I don't think __FILE_NAME__ is actually supported in Swift: https://github.com/apple/swift/search?q=__filename_\&unscopedq=\_filename_\

jtbandes commented 4 years ago

Thanks!