protected function Parser::parseComments in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php \Egulias\EmailValidator\Parser\Parser::parseComments()
Return value
string the the comment
Throws
\InvalidArgumentException
2 calls to Parser::parseComments()
- DomainPart::doParseDomainPart in vendor/
egulias/ email-validator/ src/ Egulias/ EmailValidator/ Parser/ DomainPart.php - LocalPart::parse in vendor/
egulias/ email-validator/ src/ Egulias/ EmailValidator/ Parser/ LocalPart.php
File
- vendor/
egulias/ email-validator/ src/ Egulias/ EmailValidator/ Parser/ Parser.php, line 42
Class
Namespace
Egulias\EmailValidator\ParserCode
protected function parseComments() {
$this
->isUnclosedComment();
$this->warnings[] = EmailValidator::CFWS_COMMENT;
while (!$this->lexer
->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) {
$this
->warnEscaping();
$this->lexer
->moveNext();
}
$this->lexer
->moveNext();
if ($this->lexer
->isNextTokenAny(array(
EmailLexer::GENERIC,
EmailLexer::S_EMPTY,
))) {
throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT');
}
if ($this->lexer
->isNextToken(EmailLexer::S_AT)) {
$this->warnings[] = EmailValidator::DEPREC_CFWS_NEAR_AT;
}
}