Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 5f1249d

Browse files
authored
chore(backend): override children() on PythonNamedSpread and PythonPositionalSpread (#814)
1 parent 4672a46 commit 5f1249d

File tree

1 file changed

+8
-0
lines changed
  • api-editor/backend/src/main/kotlin/com/larsreimann/api_editor/mutable_model

1 file changed

+8
-0
lines changed

api-editor/backend/src/main/kotlin/com/larsreimann/api_editor/mutable_model/PythonAst.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,18 @@ class PythonMemberAccess(
271271

272272
class PythonNamedSpread(argument: PythonExpression) : PythonExpression() {
273273
var argument by ContainmentReference(argument)
274+
275+
override fun children() = sequence {
276+
argument?.let { yield(it) }
277+
}
274278
}
275279

276280
class PythonPositionalSpread(argument: PythonExpression) : PythonExpression() {
277281
var argument by ContainmentReference(argument)
282+
283+
override fun children() = sequence {
284+
argument?.let { yield(it) }
285+
}
278286
}
279287

280288
class PythonReference(declaration: PythonDeclaration) : PythonExpression() {

0 commit comments

Comments
 (0)