php-dextrin

Token.php

Table of Contents

Classes

Token
One lexed token. `start`/`end` are **codepoint indices**, not byte offsets -- {@see Lexer} operates on the source split into an array of single-codepoint strings (`preg_split('//u', ...)`) rather than raw byte-indexed PHP strings, which sidesteps multi-byte UTF-8 sequences entirely (a JS port indexes UTF-16 code units natively; PHP strings are raw bytes, so this port picks codepoints as its own natural, consistently-defined unit instead).
On this page

Search results