mirror of
https://github.com/krzysztofzablocki/Sourcery.git
synced 2026-04-07 19:17:40 +00:00
cec7895f0a
* Adjusted file structure to accommodate two generated files * Adjusted scripting * Removed Description, Diffable, Equality for now * Removed Stencil import * Updated templates * Updated scripting * Updated generated coding * Disable build deletion (temp) * Updated template * Updated generated code * updated generated code * Updated generated code * Adjusted scripting * Updated scripting * Updated generated code * Reverted template deletion * Removed Stencil imports * Updated generated code * trigger CI * Removed description, diffable and equality stencil templates * Reverted temporary changes * Commented failing tests * Skipping JSExport for description & hash * Updated generated code * Enabled failing tests * Adding stencil templates back to test tests * Reset generated file for linux for test * Reverted Extensions for testing * Reverted ParserResultsComposed * Attempt to fix unit tests * Attempt to resolve unit test * Reverted TypeName asSource * Reverted TypeName revertion * Reverted revert of ParserResultComposed * Reverted revert of Extensions * Reverted revert of Linux.content.generated * Reverted attempts to fix unit tests * Fix for the failing codegen tests * Added clarifying comment * Removed description, diffable and equality stencil templates * Updated generated code * Tinkering with optimization level for speed boost * Excluded stencil templates for codegen * Fixed wrong compiler flag * Removed speed optimization to a separate PR * Reverted test code
103 lines
2.0 KiB
Swift
103 lines
2.0 KiB
Swift
// Generated using Sourcery 2.1.7 — https://github.com/krzysztofzablocki/Sourcery
|
|
// DO NOT EDIT
|
|
// swiftlint:disable vertical_whitespace trailing_newline
|
|
|
|
import Foundation
|
|
|
|
|
|
extension NSCoder {
|
|
|
|
@nonobjc func decode(forKey: String) -> String? {
|
|
return self.maybeDecode(forKey: forKey) as String?
|
|
}
|
|
|
|
@nonobjc func decode(forKey: String) -> TypeName? {
|
|
return self.maybeDecode(forKey: forKey) as TypeName?
|
|
}
|
|
|
|
@nonobjc func decode(forKey: String) -> AccessLevel? {
|
|
return self.maybeDecode(forKey: forKey) as AccessLevel?
|
|
}
|
|
|
|
@nonobjc func decode(forKey: String) -> Bool {
|
|
return self.decodeBool(forKey: forKey)
|
|
}
|
|
|
|
@nonobjc func decode(forKey: String) -> Int {
|
|
return self.decodeInteger(forKey: forKey)
|
|
}
|
|
|
|
func decode<E>(forKey: String) -> E? {
|
|
return maybeDecode(forKey: forKey) as E?
|
|
}
|
|
|
|
fileprivate func maybeDecode<E>(forKey: String) -> E? {
|
|
guard let object = self.decodeObject(forKey: forKey) else {
|
|
return nil
|
|
}
|
|
|
|
return object as? E
|
|
}
|
|
|
|
}
|
|
|
|
extension ArrayType: NSCoding {}
|
|
|
|
extension AssociatedType: NSCoding {}
|
|
|
|
extension AssociatedValue: NSCoding {}
|
|
|
|
extension Attribute: NSCoding {}
|
|
|
|
extension BytesRange: NSCoding {}
|
|
|
|
|
|
extension ClosureParameter: NSCoding {}
|
|
|
|
extension ClosureType: NSCoding {}
|
|
|
|
extension DictionaryType: NSCoding {}
|
|
|
|
|
|
extension EnumCase: NSCoding {}
|
|
|
|
extension FileParserResult: NSCoding {}
|
|
|
|
extension GenericParameter: NSCoding {}
|
|
|
|
extension GenericRequirement: NSCoding {}
|
|
|
|
extension GenericType: NSCoding {}
|
|
|
|
extension GenericTypeParameter: NSCoding {}
|
|
|
|
extension Import: NSCoding {}
|
|
|
|
extension Method: NSCoding {}
|
|
|
|
extension MethodParameter: NSCoding {}
|
|
|
|
extension Modifier: NSCoding {}
|
|
|
|
|
|
|
|
extension SetType: NSCoding {}
|
|
|
|
|
|
extension Subscript: NSCoding {}
|
|
|
|
extension TupleElement: NSCoding {}
|
|
|
|
extension TupleType: NSCoding {}
|
|
|
|
extension Type: NSCoding {}
|
|
|
|
extension TypeName: NSCoding {}
|
|
|
|
extension Typealias: NSCoding {}
|
|
|
|
extension Types: NSCoding {}
|
|
|
|
extension Variable: NSCoding {}
|
|
|