func model()

in Sources/MockoloFramework/Parsers/SwiftSyntaxExtensions.swift [612:647]


    func model(inInit: Bool, declKind: NominalTypeDeclKind, index: Int) -> ParamModel {
        let label: String
        let name: String
        // Get label and name of args
        let first = self.firstName.text
        if let second = self.secondName?.text {
            label = first
            if second == "_" {
                name = "_\(index)"
            } else {
                name = second
            }
        } else {
            if first == "_" {
                label = first
                name = "_\(index)"
            } else {
                label = ""
                name = first
            }
        }

        var type = self.type.trimmedDescription
        if ellipsis != nil {
            type.append("...")
        }

        return ParamModel(label: label,
                          name: name,
                          type: SwiftType(type),
                          isGeneric: false,
                          inInit: inInit,
                          needsVarDecl: declKind == .protocol,
                          offset: self.offset,
                          length: self.length)
    }