112 Commits

Author SHA1 Message Date
Keith Smiley
bb62135c43 More attributes 2023-08-01 21:15:38 -07:00
Keith Smiley
ad75808961 Add some more keywords from Swift 5.9 2023-06-06 16:42:30 -07:00
Keith Smiley
51108a710e Add some more attributes and keywords
Some of these are optimistic about upcoming features
2023-04-04 11:58:21 -07:00
Gonzalo
ba6f6cef58 Add 'any' keyword. (#150) 2022-11-05 09:13:13 -07:00
Keith Smiley
3e0529e1a9 Add @_disfavoredOverload 2022-08-01 09:21:16 -07:00
Keith Smiley
64256d0f2c Add some various SwiftUI property wrappers
It feels a bit weird to add these but it's practical!
2022-03-04 15:16:02 -08:00
Keith Smiley
3f1c8e297f Add isolated / nonisolated 2022-02-28 11:28:20 -08:00
Keith Smiley
478e11812f Add @preconcurrency 2022-01-28 11:09:06 -08:00
Keith Smiley
108e239e08 Add #unavailable keyword 2022-01-27 10:59:39 -08:00
Keith Smiley
3278cf3b05 Add #fileID and #filePath 2021-09-10 10:34:38 -07:00
Keith Smiley
7ef452b47f Update some keywords 2021-05-30 10:37:49 -07:00
Keith Smiley
74af6626f6 Add @resultBuilder 2021-05-05 10:12:52 -07:00
Keith Smiley
245e5f7aae Add @_implementationOnly 2019-12-04 18:41:57 -08:00
Keith Smiley
7a3b81bbdb Add opaque return type keyword 2019-07-08 21:45:11 -07:00
Keith Smiley
6415e52c05 Add more attributes 2019-07-08 19:35:13 -07:00
Keith Smiley
5e330f026d Add new inlinable attributes 2018-09-12 10:40:26 -07:00
Keith Smiley
404df978f9 Add open to keywords 2018-04-20 11:37:48 -07:00
Keith Smiley
46a93db57f Fix interpolated wrapper contains 2018-04-01 23:38:51 -07:00
Harlan
a7bd522aab Add #warning and #error to Syntax file 2018-02-03 20:48:17 -05:00
Andrew Breckenridge
3427c1592c Remove Last Modified comment
The comment isn't being kept up to date, so it ends up misleading readers into thinking the file hasn't been updated in years. I think it makes sense to remove it, git's log system works better to date this
2018-02-02 15:48:27 -08:00
Keith Smiley
f3f4c47c95 Add multiline string literal support 2017-12-01 17:26:58 -08:00
Akshay Hegde
f7779b4321 Ensure swiftTypeWrapper only wraps types in its own matchgroup
Enum members, numbers, other literals like string will be highlighted
separately as part of their own matchgroup.

The result is that this:

fixes #93
fixes #90
fixes #89
2017-08-25 12:04:36 -07:00
Akshay Hegde
a45deca220 Don't highlight a period as an operator
References #121
2017-08-24 22:49:46 -07:00
Akshay Hegde
350d49c5b9 Fix an issue where numbers were being highlighted as properties
Improves regex for swiftMethod and swiftProperties to expect a non-digit
following a period, as swift does not allow methods/funcs starting with
a digit.

Resolves #100
2017-08-23 21:51:02 -07:00
Keith Smiley
7c086c758a Add escaping attribute 2017-08-14 00:23:38 -07:00
Martin Conte Mac Donell
5a948846af Add rethrow as a modifier 2017-03-25 16:25:00 -07:00
Rod Knowlton
0108c381c9 Prevent swiftComment match from hiding region end
When a block style comment contains `//` on the same line as its end mark, it was causing the region to extend to the end of file.
2017-01-28 19:49:58 -06:00
Daniel Duan
2641418780 display indirect enum as a keyword 2017-01-02 15:28:12 -08:00
Keith Smiley
d9c641cfd3 Add precedencegroup keyword 2016-10-23 01:22:18 +08:00
raimon
b10a32b08b Add keywords and examples for custom operator symbols (#104)
* Add keywords and examples for custom operator symbols

* Remove func of custom operator in example
2016-10-08 19:40:14 -07:00
Keith Smiley
15615f21c0 Add discardableResult keyword 2016-10-08 03:07:07 -07:00
Sam Symons
b2bd2a1f1d Add fileprivate. 2016-07-21 08:31:04 -07:00
raimon
08016710f2 Add match pattern underscore to hex, binary, octal literals
See also:
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html
2016-05-08 16:42:59 +09:00
Keith Smiley
b4262ec767 Only highlight indirect when followed by case 2016-04-24 13:50:37 -07:00
Keith Smiley
3efa034dda Merge pull request #84 from ajh17/typecasts
Add syntax highlighting for type casts
2016-04-24 13:41:58 -07:00
Akshay Hegde
bb98df4563 Fix syntax coloring in string interpolation
Start the match just before the \( part
2016-04-24 13:36:22 -07:00
Akshay Hegde
a2cca58680 Add syntax highlighting for type casts
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
2016-04-24 13:22:04 -07:00
Keith Smiley
9fb609e321 Merge pull request #82 from ajh17/selector-syntax
Highlight #selector keyword [SE-0022]
2016-04-24 11:44:57 -07:00
Akshay Hegde
d23e21ce38 Implement highlighting for properties and enum members 2016-04-24 11:43:31 -07:00
Akshay Hegde
03140ad483 Highlight #selector keyword [SE-0022]
From swift-evolution:
https://github.com/apple/swift-evolution/blob/master/proposals/0022-objc-selectors.md
2016-04-24 11:43:10 -07:00
Daniel Duan
328a7c3a4c highlight Swift line directive [SE-0034] 2016-03-01 01:12:23 -08:00
Daniel Duan
1817bc4240 highlight Swift buildtin expressions 2016-02-22 15:31:19 -08:00
Daniel Duan
b5c249e9ab add 'associatedtype' as a keyword 2016-02-12 15:49:02 -08:00
Keith Smiley
41d75c07bd Make swiftInterpolatedWrapper only span a single line
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.
2016-02-08 15:08:43 -08:00
Keith Smiley
5258bd9892 Swift strings are only allowed to be on a single line
Before the match could go on forever
2016-01-08 16:40:25 -08:00
Keith Smiley
b583247fd7 Allow nested strings in interpolated strings
Previously this broke all following syntax highlighting because it
thought it was continuing a string
2016-01-08 16:38:51 -08:00
Keith Smiley
fa61881d9c Everything contains everything!
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.
2016-01-08 14:51:04 -08:00
Keith Smiley
d87608dcd1 Operators also should be highlighted in literals 2016-01-08 14:46:20 -08:00
Keith Smiley
7081de3cbe Literal wrappers can contain methods
This fixes a bug where a method call with a trailing [] would be
highlighted incorrectly because a different match trumped the function
call.
2016-01-08 14:42:33 -08:00
Keith Smiley
66474b647a Single forward slash terminates type wrappers
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
2016-01-08 14:37:03 -08:00