Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 27, 2023
1 parent 9024868 commit dc8ef60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Neon/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dc8ef60

Please sign in to comment.