Token
MMO\client\scs · 1 symbole · générée le 27 Oct 2026
A single lexical token. Lexer
readonly class MMO\client\scs\Token
implements Stringable- Espace de noms
MMO\client\scs- Implémente
- Stringable
Propriétés8
readonly int $col- Type
- int
readonly int $line- Type
- int
readonly ?float $number- Type
- null | float
readonly string $quote- Type
- string
readonly string $text- Type
- string
readonly MMO\client\scs\TokenType $type- Type
- TokenType
readonly string $unit- Type
- string
readonly bool $ws- Type
- bool
Méthodes5
function is(MMO\client\scs\TokenType $type, ?string $text = null): bool$token->is(TokenType::Punct, '{');
function location(string $filename): MMO\client\scs\SourceLocationfunction source(): string| retourne | string | the token as it was written in the source |
__construct($type, $text, $line, $col, $ws, $number, $unit, $quote)
Token.php:8function __construct(
MMO\client\scs\TokenType $type,
string $text,
int $line = 1,
int $col = 1,
bool $ws = false,
?float $number = null,
string $unit = '',
string $quote = ''
)function __toString(): string