a collapsed non-lazy-parseable node is a leaf by definition

GitOrigin-RevId: 32f243ec38855a8bd55ed2739e7a57f57778ec9c
This commit is contained in:
Max Medvedev
2025-08-24 12:44:15 +00:00
committed by intellij-monorepo-bot
parent fe95759ac4
commit 64267eb6d9
@@ -162,6 +162,8 @@ class KmpSyntaxNode internal constructor(
isChameleon() -> (chameleonSyntaxNode?.firstChild() as KmpSyntaxNode?)
?.copy(parent = this)
ast.collapsed(markerIndex) -> null // this is a collapsed non-lazy-parseable node, meaning it's a leaf
else -> {
val childMarkerIndex = ast.firstChild(markerIndex)
when {