Moves the cursor to the given mark.

@param mixed $mark
@return AbstractTokenCursor
434167
public function moveTo($mark)
	{
		if(is_array($mark) || $mark instanceof \Countable)
		{
			$this->index = count($mark);
		}
		else
		{
			$this->index = (int)$mark;
		}

		return $this;
	}
102136
def jump_to(self, mark, offset=0):
        """"""
        self._offset = self._bookmarks[mark] + offset
803105
public function mark($label)
	{
		$this->marks[] = new Mark($label, $this->ended(), $this->now(), memory_get_usage(true));

		return $this;
	}
1228923
public function moveCursorRel($x, $y)
    {
        $yChar = ($y < 0) ? "A" : "B"; // up / down
        $xChar = ($x < 0) ? "D" : "C"; // left / right
        fwrite(STDOUT, "\e[" . abs($x) . $xChar);
        fwrite(STDOUT, "\e[" . abs($y) . $yChar);
    }
1132522
public function tokenize(Cursor $cursor)
    {
        $src = $cursor->src();
        $seek = 0;
        $end = strlen($src);
        $line = 1;

        preg_match_all($this->tagRegex, $src, $matches, PREG_OFFSET_CAPTURE);

        foreach ($matches[0] as $match) {
            list($tag, $index) = $match;

            if ($index !== $seek) {
                $text = substr($src, $seek, $index - $seek);
                $line += substr_count($line, "\n");

                $cursor->add(Token::TYPE_TEXT, $text, $line);
            }

            $tokens = parent::tokenize(new Cursor($tag, $line));
            array_pop($tokens); // Pop the Token::TYPE_EOF.

            $cursor->merge($tokens);

            $seek = $index + strlen($tag);
        }

        if ($cursor !== $end) {
            $text = substr($src, $seek, $end - $seek);

            $cursor->add(Token::TYPE_TEXT, $text, $line);
        }

        $cursor->add(Token::TYPE_EOF);

        return $cursor->getTokens();
    }
621747
public function dump(Definition $definition, Marking $marking = null, array $options = [])
    {
        $places = $this->findPlaces($definition, $marking);
        $transitions = $this->findTransitions($definition);
        $edges = $this->findEdges($definition);

        $options = array_replace_recursive(self::$defaultOptions, $options);

        return $this->startDot($options)
            .$this->addPlaces($places)
            .$this->addTransitions($transitions)
            .$this->addEdges($edges)
            .$this->endDot();
    }
355749
public function next()
    {
        if (!isset($this->tokens[$this->position])) {
            throw new SyntaxError('Unexpected end of expression', $this->current->cursor);
        }

        ++$this->position;

        $this->current = $this->tokens[$this->position];
    }
462091
public function mark($mark, $value=null)
     {
        $marks = $this->matchingListener->markToArray($mark, $value, $this->knownMarks);
        $newMarks = array_merge($this->marks, $marks);
        return new static($this->root, $newMarks, $this->markFilters);
     }
39434
public function setAccessToken($token)
    {
        /**
         * @var Client $google
         */
        $google = Container::getInstance()->make(Client::class);

        $google->getCache()->clear();

        $google->setAccessToken($token);

        if (isset($token['refresh_token']) and $google->isAccessTokenExpired()) {
            $google->fetchAccessTokenWithRefreshToken();
        }

        return $this->setService($google->make('sheets'))
                    ->setDriveService($google->make('drive'));
    }
144196
public int moveTokens() {
        int count;
        if(token == -1) {
            return 0;
        }

        int skip = limit - token;
        if(skip < 0) {
            return 0;
        }

        if((count = token - buffer.start) != 0) {
            System.arraycopy(buffer.buffer, token, buffer.buffer, buffer.start, skip);
            token = buffer.start;
            marker -= count;
            cursor -= count;
            toktmp -= count;
            limit -= count;
            lineptr -= count;
            linectptr -= count;
        }
        return skip;
    }
532090
public function moveNext()
    {
        $this->peek = 0;
        $this->token = $this->next;
        $this->next = isset($this->tokens[++$this->i]) ? $this->tokens[$this->i] : null;

        return null !== $this->next;
    }
480311
public function mark()
    {
        if (!$this->markSupported()) {
            throw new IOException(get_class($this) . " does not support mark() and reset() methods.");
        }
        $this->mark = $this->currentPosition;
    }
548308
public function setMarking($subject, Marking $marking/*, array $context = []*/)
    {
        $this->propertyAccessor->setValue($subject, $this->property, $marking->getPlaces());
    }
313921
private function doTransitionFromG() : self
    {
        if ($this->getToken() === Grammar::T_N) {
            $this
                ->setState(self::STATE_Y)
                ->addPosition(1);
            return $this;
        }

        if ($this->getToken() === Grammar::T_M) {
            $this
                ->setState(self::STATE_G)
                ->addPosition(1)
                ->addTokenValue(Grammar::T_M);
            return $this;
        }

        $this->setState(self::STATE_F);
        return $this;
    }
672789
public function hint($keyPattern)
    {
        $this->hint = $keyPattern;
        $this->mongoCursor->hint($keyPattern);
        return $this;
    }
1009576
public function setField($field, $value, $markChanged = true)
    {
        $this->objCacheClear();

        // Non-db fields get assigned as normal properties
        if (!$this->hasField($field)) {
            parent::setField($field, $value);

            return $this;
        }

        // Set changed
        if ($markChanged) {
            $this->isChanged = true;
        }

        // Set bound object
        if ($this->record instanceof DataObject) {
            $key = $this->getName() . $field;
            $this->record->setField($key, $value);
            return $this;
        }

        // Set local record
        $this->record[$field] = $value;
        return $this;
    }
347192
public function cursor()
    {
        static $stmt;
        if (!$stmt) {
            $this->setPrepareParams(array(\PDO::ATTR_CURSOR => \PDO::CURSOR_SCROLL));
            $this->prepFetch();
            $stmt = $this->oosql_stmt;
        }

        return $stmt;
    }