Lines Matching refs:reader
46 public function handle(Reader $reader, TokenStream $stream): bool argument
48 $quote = $reader->getSubstring(1);
54 $reader->moveForward(1);
55 $match = $reader->findPattern($this->patterns->getQuotedStringPattern($quote));
58 …rrorException(sprintf('Should have found at least an empty match at %d.', $reader->getPosition()));
62 if (\strlen($match[0]) === $reader->getRemainingLength()) {
63 throw SyntaxErrorException::unclosedString($reader->getPosition() - 1);
67 if ($quote !== $reader->getSubstring(1, \strlen($match[0]))) {
68 throw SyntaxErrorException::unclosedString($reader->getPosition() - 1);
72 $stream->push(new Token(Token::TYPE_STRING, $string, $reader->getPosition()));
73 $reader->moveForward(\strlen($match[0]) + 1);