mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When creating the token map for highlighting, there is some glitchy
behavior that needed to be cleaned up:
- New image literal syntax wasn't getting highlighted as an object
literal keyword.
- Other #-prefixed keywords had no data
- #line would appear as a build config ("brown") at the start of a line
- #available showed up as a build config. However, this should be a keyword
because it is a runtime check, not a build configuration.
Add some test cases for these.
Fixes:
rdar://problem/26451674
7 lines
278 B
Swift
7 lines
278 B
Swift
// RUN: %sourcekitd-test -req=syntax-map %s | %sed_clean > %t.response
|
|
// RUN: diff -u %s.response %t.response
|
|
|
|
let image = #imageLiteral(resourceName: "cloud.png")
|
|
let color = #colorLiteral(red: 1, blue: 0, green: 1, alpha: 1)
|
|
let file = #fileLiteral(resourceName: "test.txt")
|