diff --git a/src/GrammarProcessing/AbstractSyntaxTree.php b/src/GrammarProcessing/AbstractSyntaxTree.php index 481d444..dc77ba0 100644 --- a/src/GrammarProcessing/AbstractSyntaxTree.php +++ b/src/GrammarProcessing/AbstractSyntaxTree.php @@ -32,6 +32,10 @@ public function interpret(Interpretation $interpretation): mixed if ($currentGenerator->valid()) { $subnode = $currentGenerator->current(); + if ($subnode instanceof SelectedNode) { + $subnode = $subnode->value; + } + if ($subnode === NULL) { $currentGenerator->send(NULL); } elseif ($subnode instanceof Token) {