diff --git a/Generator/Source/CuckooGeneratorFramework/Tokens/Attribute.swift b/Generator/Source/CuckooGeneratorFramework/Tokens/Attribute.swift index 5b6c1dd..639f077 100644 --- a/Generator/Source/CuckooGeneratorFramework/Tokens/Attribute.swift +++ b/Generator/Source/CuckooGeneratorFramework/Tokens/Attribute.swift @@ -16,4 +16,5 @@ public enum Attribute: String { case weak = "source.decl.attribute.weak" case ibAction = "source.decl.attribute.ibaction" case ibOutlet = "source.decl.attribute.iboutlet" + case available = "source.decl.attribute.available" } diff --git a/Generator/Source/CuckooGeneratorFramework/Tokens/ClassDeclaration.swift b/Generator/Source/CuckooGeneratorFramework/Tokens/ClassDeclaration.swift index d482663..b6bfb86 100644 --- a/Generator/Source/CuckooGeneratorFramework/Tokens/ClassDeclaration.swift +++ b/Generator/Source/CuckooGeneratorFramework/Tokens/ClassDeclaration.swift @@ -23,14 +23,17 @@ public struct ClassDeclaration: ContainerToken { } public func replace(children tokens: [Token]) -> ClassDeclaration { - return ClassDeclaration(name: self.name, - accessibility: self.accessibility, - range: self.range, - nameRange: self.nameRange, - bodyRange: self.bodyRange, - initializers: self.initializers, - children: tokens, - inheritedTypes: self.inheritedTypes) + return ClassDeclaration( + name: self.name, + accessibility: self.accessibility, + range: self.range, + nameRange: self.nameRange, + bodyRange: self.bodyRange, + initializers: self.initializers, + children: tokens, + implementation: self.implementation, + inheritedTypes: self.inheritedTypes, + attributes: self.attributes) } public func isEqual(to other: Token) -> Bool { diff --git a/Generator/Source/CuckooGeneratorFramework/Tokens/ProtocolDeclaration.swift b/Generator/Source/CuckooGeneratorFramework/Tokens/ProtocolDeclaration.swift index 648cc8e..c89e689 100644 --- a/Generator/Source/CuckooGeneratorFramework/Tokens/ProtocolDeclaration.swift +++ b/Generator/Source/CuckooGeneratorFramework/Tokens/ProtocolDeclaration.swift @@ -19,14 +19,17 @@ public struct ProtocolDeclaration: ContainerToken { public let attributes: [Attribute] = [] public func replace(children tokens: [Token]) -> ProtocolDeclaration { - return ProtocolDeclaration(name: self.name, - accessibility: self.accessibility, - range: self.range, - nameRange: self.nameRange, - bodyRange: self.bodyRange, - initializers: self.initializers, - children: tokens, - inheritedTypes: self.inheritedTypes) + return ProtocolDeclaration( + name: self.name, + accessibility: self.accessibility, + range: self.range, + nameRange: self.nameRange, + bodyRange: self.bodyRange, + initializers: self.initializers, + children: tokens, + implementation: self.implementation + inheritedTypes: self.inheritedTypes, + attributes: self.attributes) } public func isEqual(to other: Token) -> Bool {