This commit separates `as` and `is` into their own keyword syntax,
and contains them in a new syntax region for type casts.
Also removes an extraneous `swiftGenericsWrapper` in the `swiftType`
syntax match.
Fixes#48
This is part of the language and previously broken syntax highlighting
broken everything below it as well. Now the highlighting is fixed as
well. It was fallout from changing the type wrapper to contain ALL.
This fixes the python-style indenting that was previously done. If you
had a codeblock like this:
```swift
let foo = Thing(arg: arg,
arg2: arg2)
```
The indent of the second line would be the opening paren +1. This has
changed to:
```swift
let foo = Thing(arg: arg,
arg2: arg2)
```
Which is the indent of the opening paren line +1 'shiftwidth'
This fixes the case where the closing square bracket of something (like
an array) is on the same line as an entry, so it should be indented one
level above the opening square bracket
This can't possibly be true. But right now somethings haven't been
highlighted correctly because the wrapper types have been blocking them.
Now these are explicitly marked as containing ALL, which works in the
example.swift file. I'm sure we're going to have to back this off, and
we'll do that case by case.
This fixes a problem where comments at the end of a line could be
contained in the highlighting of the prefix. Now matches end 1 character
before their "actual" end
This adds the availability arguments described in the "Attributes"
chapter of the "The Swift Programming Language" book. Also expand the
list of platform names based on the Swift book.
References #56
Conforming to Xcode, the syntax file now highlights platforms contained
within the `#available` condition.
It also now removes highlighting numbers and the "*" (i.e, symbol for
future platforms) that are contained within the `#available` condition
since they are not literal numbers or operator (thanks to @acclissold
for the idea)
Additionally, add tests to example.swift to demonstrate highlighting of
them.
References #56
Swift compiler currently allows multiple underscore in an underscore
padded number. For instance, 1___00 is a valid way to write 100 in
Swift.
Also add more underscore padded numbers in example.swift file for
testing purposes. Thanks to @aclissold for these.
References #55
"The Basics" chapter of the official "The Swift Programming Language"
book states that you can pad numbers with underscores to help
readability.
This commit also handles the case where underscore padded numbers can
also contain a period (i.e., underscore padded float/double)
Additionally, added some underscore padded numbers in example/swift.vim
for testing purposes.
Fixes#51