mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
[python] Convert PySequencePattern and PyMappingPattern to kotlin
GitOrigin-RevId: 074ed9f865556d561237fc894d202d76995ab562
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7efaf9a137
commit
6a35fa7cc1
@@ -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 {
|
||||
}
|
||||
@@ -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
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user