func model()

in Sources/MockoloFramework/Parsers/SwiftSyntaxExtensions.swift [642:675]


    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 = SwiftType(typeSyntax: self.type)
        type.hasEllipsis = ellipsis != nil

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