1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-13 09:57:25 +01:00
PHP-Parser/lib/PhpParser/Token.php
Nikita Popov 6f74784e16 Switch to a normalized token representation
Each token is now represented by a Token object.
2019-06-30 14:14:24 +02:00

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;
}
}