mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-13 09:57:25 +01:00
6f74784e16
Each token is now represented by a Token object.
21 lines
557 B
PHP
21 lines
557 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace PhpParser;
|
|
|
|
class Token {
|
|
/** @var int Token id (T_* constant) */
|
|
public $id;
|
|
/** @var string Textual value of the token */
|
|
public $value;
|
|
/** @var int Start line number of the token */
|
|
public $line;
|
|
/** @var int Offset of the token in the source code */
|
|
public $filePos;
|
|
|
|
public function __construct(int $id, string $value, int $line, int $filePos) {
|
|
$this->id = $id;
|
|
$this->value = $value;
|
|
$this->line = $line;
|
|
$this->filePos = $filePos;
|
|
}
|
|
} |