… let sourceFileSyntaxes = … var componentDescriptors = [ComponentDescriptor]() for sourceFileSyntax in sourceFileSyntaxes { let componentVisitor = ComponentVisitor(viewMode: .sourceAccurate) componentVisitor.walk(sourceFileSyntax) componentDescriptors.append(contentsOf: componentVisitor.results) } } }
type: String let name: String } let parameters: [Parameter] } let componentName: String let type: String let injectedInitializers: [Initializer] let location: SourceLocation }
type: String let name: String } let parameters: [Parameter] } let componentName: String let type: String let injectedInitializers: [Initializer] let location: SourceLocation } public struct SourceLocation: Hashable, Codable, Sendable { /// The fi le in which this location resides. public let file: String /// The line in the fi le where this location resides. 1-based. public var line: Int /// The UTF-8 byte o ff set from the beginning of the line where this location /// resides. 1-based. public let column: Int … }