Skip to content

Commit 243217c

Browse files
committed
Graciously handle yielding SelectedNode
1 parent 266bfd2 commit 243217c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/GrammarProcessing/AbstractSyntaxTree.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public function interpret(Interpretation $interpretation): mixed
3232
if ($currentGenerator->valid()) {
3333
$subnode = $currentGenerator->current();
3434

35+
if ($subnode instanceof SelectedNode) {
36+
$subnode = $subnode->value;
37+
}
38+
3539
if ($subnode === NULL) {
3640
$currentGenerator->send(NULL);
3741
} elseif ($subnode instanceof Token) {

0 commit comments

Comments
 (0)