matchPattern( $buffer, $offset, '([^\\\\\']+)S' ); if (!empty($tokenString)) { return new Scanner\Token( Scanner\Token::STRING_CHARACTERS, $tokenString, $offset ); } return NULL; } /** * Check if token ends status * * @param Scanner\Token $token * @return boolean */ public function isEndToken(Scanner\Token $token): bool { return ( $token->type === Scanner\Token::SINGLEQUOTE_STRING_END ); } /** * Get new (sub)status if needed. * * Returns always NULL, because a string never has a sub status * * @param Scanner\Token $token * @return Scanner\Status|NULL */ public function getNewStatus(Scanner\Token $token): ?Scanner\Status { return NULL; } } }