public function TokenParser::next in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php \Doctrine\Common\Annotations\TokenParser::next()
Gets the next non whitespace and non comment token.
Parameters
boolean $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped.: If FALSE then only whitespace and normal comments are skipped.
Return value
array|null The token if exists, null otherwise.
3 calls to TokenParser::next()
- TokenParser::parseNamespace in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ TokenParser.php - Gets the namespace.
- TokenParser::parseUseStatement in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ TokenParser.php - Parses a single use statement.
- TokenParser::parseUseStatements in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ TokenParser.php - Gets all use statements.
File
- modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ TokenParser.php, line 78
Class
- TokenParser
- Parses a file for namespaces/use/class declarations.
Namespace
Doctrine\Common\AnnotationsCode
public function next($docCommentIsComment = TRUE) {
for ($i = $this->pointer; $i < $this->numTokens; $i++) {
$this->pointer++;
if ($this->tokens[$i][0] === T_WHITESPACE || $this->tokens[$i][0] === T_COMMENT || $docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) {
continue;
}
return $this->tokens[$i];
}
return null;
}