function Scanner::setScanPosition
Sets the current scan position at the given one
Parameters
Position $position Position at which the scan position will be set:
Return value
$this
2 calls to Scanner::setScanPosition()
- Scanner::getToken in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Scanner.php - Returns the current token
- Scanner::reconsumeCurrentTokenAsRegexp in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Scanner.php - Tries to reconsume the current token as a regexp if possible
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Scanner.php, line 617
Class
- Scanner
- Base class for scanners.
Namespace
Peast\SyntaxCode
public function setScanPosition(Position $position) {
$this->line = $position->getLine();
$this->column = $position->getColumn();
$this->index = $position->getIndex();
return $this;
}