Skip to content

Commit ae04edd

Browse files
committed
removed Token::$offset
1 parent d899ece commit ae04edd

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Neon/Lexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function tokenize(string $input): TokenStream
7272
}
7373
}
7474

75-
$token = new Token($token[0], $offset, $type);
75+
$token = new Token($token[0], $type);
7676
$offset += strlen($token->value);
7777
}
7878

src/Neon/Token.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,13 @@ final class Token
2323
/** @var string */
2424
public $value;
2525

26-
/** @var int */
27-
public $offset;
28-
2926
/** @var int|string */
3027
public $type;
3128

3229

33-
public function __construct(string $value, int $offset, $type)
30+
public function __construct(string $value, $type)
3431
{
3532
$this->value = $value;
36-
$this->offset = $offset;
3733
$this->type = $type;
3834
}
3935
}

0 commit comments

Comments
 (0)