Closed akoaysigod closed 9 years ago
I should have ran the test first. I'm still pretty new to all this. The switch case statement tests aren't failing on my machine. I'll check if they're up to date.
I checked your PR and it seems that else
confuses smie
. It kind of makes sense, since if
grammar says that else
is expected after if-body
. I would recommend to tokenize this keyword differently in lexer, something like this.
That was it. Let me know what you think. It should pass all the tests and I added a basic one for the guard statements. I ran into a bug though where one of the test is passing that shouldn't. Maybe this will pick up on it?
edit: It didn't indents-declaration-statements-in-enum/1
isn't failing but it's not working for me.
enum Test {
case T
var x: String {
}
}
Is what happens to me. But the second var will indent correctly. This also is happening in the version I downloaded from elpa.
Thanks, looks good. About test inconsistencies, I checked it and can confirm the issue with enum
. Weird thing is that test is deffinitelly running and expected location is correct (checked it by moving expected location). I will try to invistigate it a bit more.
I double checked this test and actual behaviour on master and it works for me. Not sure why I had different behaviour in your branch...
Added guard statement from issue #96 it seems to be working fine. I'm still trying to figure out SMIE I figured I'd try to do what seems like the easiest of the new features in Swift 2.0.