if ($this->lexer->current->
isA(EmailLexer::S_HYPHEN
) &&
$this->lexer->
isNextToken(EmailLexer::S_DOT
)) { return new InvalidEmail(new DomainHyphened('Hypen found near DOT'
),
$this->lexer->current->value
);
} if ( $this->lexer->current->
isA(EmailLexer::S_BACKSLASH
) &&
$this->lexer->
isNextToken(EmailLexer::GENERIC
) ) { return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'
),
$this->lexer->current->value
);
} return $this->
validateTokens($hasComments);
} protected function validateTokens(bool
$hasComments): Result
{ $validDomainTokens = array
( EmailLexer::GENERIC => true,
EmailLexer::S_HYPHEN => true,
EmailLexer::S_DOT => true,
);
if ($hasComments) {