From dc8ef60d697f1686e21b4cfe59f85fce94ea407d Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 27 Sep 2023 14:42:18 +0200 Subject: [PATCH] wip --- src/Neon/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Neon/Parser.php b/src/Neon/Parser.php index 90f595d..e019df0 100644 --- a/src/Neon/Parser.php +++ b/src/Neon/Parser.php @@ -234,7 +234,7 @@ private function checkArrayKey(Node $key, array &$arr): void private function injectPos(Node $node, Position $start = null, Position $end = null): Node { - $node->start = $start ?? $this->stream->tokens[$this->stream->getIndex()]->position; // peek + $node->start = $start ?? $this->stream->peek()->position; $node->end = $end ?? $node->start; // TODO: end je tricky! return $node; }