0001 // 0002 // ControlCode.swift 0003 // Rainbow 0004 // 0005 // Created by Wei Wang on 15/12/22. 0006 // 0007 // Copyright (c) 2015 Wei Wang <onevcat@gmail.com> 0008 // 0009 // Permission is hereby granted, free of charge, to any person obtaining a copy 0010 // of this software and associated documentation files (the "Software"), to deal 0011 // in the Software without restriction, including without limitation the rights 0012 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 0013 // copies of the Software, and to permit persons to whom the Software is 0014 // furnished to do so, subject to the following conditions: 0015 // 0016 // The above copyright notice and this permission notice shall be included in 0017 // all copies or substantial portions of the Software. 0018 // 0019 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0020 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0021 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 0022 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 0023 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 0024 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 0025 // THE SOFTWARE. 0026 0027 struct ControlCode{ 0028 static let ESC
ControlCode.swift:29 static let CSI = "\(ESC)["ModesExtractor.swift:35 let token = ControlCode.CSIModesExtractor.swift:56 let token = ControlCode.CSIModesExtractor.swift:62 while outer == ControlCode.ESC {Rainbow.swift:88 let token = ControlCode.CSIRainbow.swift:93 let token = ControlCode.CSIStringGenerator.swift:47 return "\(ControlCode.CSI)\(codes.map{String($0)}.joinWithSeparator(";"))m\(text)\(ControlCode.CSI)0m"StringGenerator.swift:47 return "\(ControlCode.CSI)\(codes.map{String($0)}.joinWithSeparator(";"))m\(text)\(ControlCode.CSI)0m"StringGenerator.swift:59 result += "\(ControlCode.CSI)\(color.xcodeColorsDescription);"StringGenerator.swift:64 result += "\(ControlCode.CSI)\(backgroundColor.xcodeColorsDescription);"StringGenerator.swift:71 result += "\(ControlCode.CSI);"= "\u{001B}" 0029 static let CSI
ControlCode.swift:29 static let CSI = "\(ESC)["ModesExtractor.swift:62 while outer == ControlCode.ESC {= "\(ESC)[" 0030 } 0031
ModesExtractor.swift:35 let token = ControlCode.CSIModesExtractor.swift:56 let token = ControlCode.CSIRainbow.swift:88 let token = ControlCode.CSIRainbow.swift:93 let token = ControlCode.CSIStringGenerator.swift:47 return "\(ControlCode.CSI)\(codes.map{String($0)}.joinWithSeparator(";"))m\(text)\(ControlCode.CSI)0m"StringGenerator.swift:47 return "\(ControlCode.CSI)\(codes.map{String($0)}.joinWithSeparator(";"))m\(text)\(ControlCode.CSI)0m"StringGenerator.swift:59 result += "\(ControlCode.CSI)\(color.xcodeColorsDescription);"StringGenerator.swift:64 result += "\(ControlCode.CSI)\(backgroundColor.xcodeColorsDescription);"StringGenerator.swift:71 result += "\(ControlCode.CSI);"