[python] Convert PySequencePattern and PyMappingPattern to kotlin

GitOrigin-RevId: 074ed9f865556d561237fc894d202d76995ab562
This commit is contained in:
Aleksandr.Govenko
2025-07-10 17:38:59 +02:00
committed by intellij-monorepo-bot
parent 7efaf9a137
commit 6a35fa7cc1
8 changed files with 265 additions and 306 deletions

View File

@@ -1,7 +0,0 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.psi;
import com.jetbrains.python.ast.PyAstMappingPattern;
public interface PyMappingPattern extends PyAstMappingPattern, PyPattern, PyCaptureContext {
}

View File

@@ -0,0 +1,6 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.psi
import com.jetbrains.python.ast.PyAstMappingPattern
interface PyMappingPattern : PyAstMappingPattern, PyPattern, PyCaptureContext

View File

@@ -1,15 +0,0 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.psi;
import com.jetbrains.python.ast.PyAstSequencePattern;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import static com.jetbrains.python.ast.PyAstElementKt.findChildrenByClass;
public interface PySequencePattern extends PyAstSequencePattern, PyPattern, PyCaptureContext {
default @NotNull List<@NotNull PyPattern> getElements() {
return List.of(findChildrenByClass(this, PyPattern.class));
}
}

View File

@@ -0,0 +1,10 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.psi
import com.jetbrains.python.ast.PyAstSequencePattern
import com.jetbrains.python.ast.findChildrenByClass
interface PySequencePattern : PyAstSequencePattern, PyPattern, PyCaptureContext {
val elements: List<PyPattern>
get() = findChildrenByClass(PyPattern::class.java).toList()
}