6 Commits

Author SHA1 Message Date
John Sundell
dc83f92228 Highlight ‘self’ as keyword when used to refer to a type
This patch fixes syntax highlighting when using `.self` to refer to a type.
2018-08-27 18:44:07 +02:00
John Sundell
1faa928214 Correctly highlight subscript declarations
This patch fixes syntax highlighting when declaring
a subscript:

```
struct MyStruct {
	subscript(key: Key) -> Value? {
		…
	}
}
```
2018-08-27 18:32:22 +02:00
John Sundell
a86694802e Highlight enums used as subscripting keys
This patch fixes highlighting when an enum is used as a dictionary key, like this:

```
let value = dictionary[.key]
```
2018-08-27 18:14:17 +02:00
John Sundell
be35cef1ea Correctly handle static methods called on a generic type
This patch fixes syntax highlighting for the following scenario:

```
Type<GenericType>.call()
```

Highlighting generic types is especially tricky, since we want them to
be highlighted when appearing at the call site, like above - but we don’t
want to highlight them when they are being declared. Hopefully with this
fix all/most edge cases are covered.
2018-08-27 00:10:08 +02:00
John Sundell
896a56b682 Correctly highlight properties after function calls
This patch fixes highlighting in the following scenarios:

```
call().property
call(argument).property
```
2018-08-25 12:56:34 +02:00
John Sundell
8645db8de0 Initial commit 2018-08-24 18:42:07 +02:00