From ae04edd3f0e166f6a4e8c742fb20b73f1f25c5af Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 18 Jan 2022 23:16:21 +0100 Subject: [PATCH] removed Token::$offset --- src/Neon/Lexer.php | 2 +- src/Neon/Token.php | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Neon/Lexer.php b/src/Neon/Lexer.php index c301ea31..879577b0 100644 --- a/src/Neon/Lexer.php +++ b/src/Neon/Lexer.php @@ -72,7 +72,7 @@ public function tokenize(string $input): TokenStream } } - $token = new Token($token[0], $offset, $type); + $token = new Token($token[0], $type); $offset += strlen($token->value); } diff --git a/src/Neon/Token.php b/src/Neon/Token.php index 2f7f4bbc..ff4e05af 100644 --- a/src/Neon/Token.php +++ b/src/Neon/Token.php @@ -23,17 +23,13 @@ final class Token /** @var string */ public $value; - /** @var int */ - public $offset; - /** @var int|string */ public $type; - public function __construct(string $value, int $offset, $type) + public function __construct(string $value, $type) { $this->value = $value; - $this->offset = $offset; $this->type = $type; } }