   blacklist.formUnionWithCharacterSet(NSCharacterSet.controlCharacterSet())
   blacklist.removeCharactersInString("_")
 
-  emojiRanges.forEach {
+  // Emoji ranges, roughly based on http://www.unicode.org/Public/emoji/1.0//emoji-data.txt
+  [
+    0x2600...0x27BF,
+    0x1F300...0x1F6FF,
+    0x1F900...0x1F9FF,
+    0x1F1E6...0x1F1FF,
+  ].forEach {
     let range = NSRange(location: $0.startIndex, length: $0.endIndex - $0.startIndex)
     blacklist.removeCharactersInRange(range)
   }

  return SwiftKeywords.contains(capitalizedSwiftName) ? "`\(capitalizedSwiftName)`" : capitalizedSwiftName
}

// Roughly based on http://www.unicode.org/Public/emoji/1.0//emoji-data.txt
private let emojiRanges = [
  0x2600...0x27BF,
  0x1F300...0x1F6FF,
  0x1F900...0x1F9FF,
  0x1F1E6...0x1F1FF,
]

private let BlacklistedCharacters = { () -> NSCharacterSet in
  let blacklist = NSMutableCharacterSet(charactersInString: "")
  blacklist.formUnionWithCharacterSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())

  return blacklist
}()

// Based on https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/doc/uid/TP40014097-CH30-ID413
private let SwiftKeywords = [
  // Keywords used in declarations
  "class", "deinit", "enum", "extension", "func", "import", "init", "inout", "internal", "let", "operator", "private", "protocol", "public", "static", "struct", "subscript", "typealias", "var",

  // Keywords used in statements
  "break", "case", "continue", "default", "defer", "do", "else", "fallthrough", "for", "guard", "if", "in", "repeat", "return", "switch", "where", "while",

  // Keywords used in expressions and types
  "as", "catch", "dynamicType", "false", "is", "nil", "rethrows", "super", "self", "Self", "throw", "throws", "true", "try", "__COLUMN__", "__FILE__", "__FUNCTION__", "__LINE__",

  // Keywords used in patterns
  "_",
]

