Token
MMO\client\scs · 1 symbol · generated 30 Sep 2026
A single lexical token. Lexer
readonly class MMO\client\scs\Token
implements Stringable- Namespace
MMO\client\scs- Implements
- Stringable
Properties8
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
Methods5
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| returns | 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