fun getParameterInfo()

in src/main/kotlin/org/arend/refactoring/changeSignature/ArendParametersInfo.kt [125:208]


        fun getParameterInfo(locatedReferable: PsiLocatedReferable): MutableList<ArendTextualParameter> {
            var index = 0
            val result = ArrayList<ArendTextualParameter>()

            for (t in ArendChangeInfo.getTeles(locatedReferable)) when (t) {
                is ArendNameTele -> for (parameter in t.identifierOrUnknownList) {
                    result.add(
                        ArendTextualParameter(
                            parameter.defIdentifier?.name ?: "_",
                            t.type?.oneLineText,
                            index,
                            t.isExplicit,
                            isProperty = t.isProperty,
                            correspondingReferable = parameter.defIdentifier
                        )
                    )
                    index++
                }
                is ArendTypeTele -> {
                    val type = t.type?.text
                    var i = 0
                    t.typedExpr?.identifierOrUnknownList?.forEach { iOU ->
                        i++
                        iOU.defIdentifier?.let { dI -> result.add(
                            ArendTextualParameter(
                                dI.name,
                                type,
                                index,
                                t.isExplicit,
                                isProperty = t.isProperty,
                                correspondingReferable = iOU.defIdentifier
                            )
                        ) }
                        index++
                    }
                    if (i == 0) {
                        result.add(
                            ArendTextualParameter(
                                "_",
                                type,
                                index,
                                t.isExplicit,
                                isProperty = t.isProperty,
                                correspondingReferable = t
                            )
                        )
                        index++
                    }
                }
                is ArendNameTeleUntyped -> {
                    result.add(
                        ArendTextualParameter(
                            t.defIdentifier.name,
                            null,
                            index,
                            t.isExplicit,
                            isProperty = t.isProperty,
                            correspondingReferable = t
                        )
                    )
                    index++
                }

                is ArendFieldTele -> {
                    for (fdI in t.referableList) {
                        result.add(
                            ArendTextualParameter(
                                fdI.name,
                                t.type?.text ?: "",
                                index,
                                t.isExplicit,
                                t.isClassifying,
                                t.isCoerce,
                                t.isProperty,
                                t.descendantOfType<ArendAccessMod>()?.accessModifier ?: AccessModifier.PUBLIC,
                                correspondingReferable = fdI
                            )
                        )
                        index++
                    }
                }
            }
            return result
        }