Files
swift-mirror/test/SourceKit/SyntaxMapData/syntaxmap-object-literals.swift
David Farler 6c726620c0 SourceKit: Clean up syntax map switch
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
2016-05-24 17:34:22 -07:00

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")