colinta / decent-swift-syntax

Uses the new `sublime-syntax` format, which is super easy to work with.
MIT License
62 stars 12 forks source link

Fix enum interference with double-quoted string #8

Closed GregoryBL closed 8 years ago

GregoryBL commented 8 years ago

This is just a narrow fix for #7 bug. Added a test case for ".foo" and all previous tests still pass (I'll note that as of Xcode 8.0 the test case .Foo+.Bar shows an error in Xcode, but I figured that was a different issue).

Without tracking types from declarations there's not really a way to differentiate between a class property (or even a normal property, if you don't follow convention with enum naming) and an enum case if the enum case includes its type (e.g. MyClass.property and MyEnum.case).

I'm not sure if marking property accesses as different from normal variables is something this project would like to do (or method calls), but if so it might be best to just lump enum cases in with however that's handled.

colinta commented 8 years ago

Thanks for that!

colinta commented 8 years ago

Available in 2.3.2