Lines Matching defs:offset
18 * Try to get token in buffer at offset position.
21 * @param integer $offset
24 abstract public function getToken(string $buffer, int $offset): ?Token;
43 * Checks if the given offset position matches the pattern.
46 * @param integer $offset
50 protected function matchPattern(string $buffer, int $offset, string $pattern): ?string {
52 $pattern, $buffer, $match, PREG_OFFSET_CAPTURE, $offset
57 $match[0][1] === $offset
64 protected function matchPatterns(string $buffer, int $offset, array $patterns): ?Token {
67 $buffer, $offset, $pattern
71 $type, $tokenString, $offset
78 protected function matchCharacters(string $buffer, int $offset, array $chars): ?Token {
79 if (isset($buffer[$offset])) {
80 $char = $buffer[$offset];
83 return new Token($type, $char, $offset);