Lines Matching defs:cursor

97         $cursor = new Cursor($line);
98 while (! $cursor->isAtEnd()) {
106 $result = $this->parseStartDefinition($cursor);
109 $result = $this->parseLabel($cursor);
112 $result = $this->parseDestination($cursor);
115 $result = $this->parseStartTitle($cursor);
118 $result = $this->parseTitle($cursor);
133 private function parseStartDefinition(Cursor $cursor): bool
135 $cursor->advanceToNextNonSpaceOrTab();
136 if ($cursor->isAtEnd() || $cursor->getCurrentCharacter() !== '[') {
143 $cursor->advance();
144 if ($cursor->isAtEnd()) {
151 private function parseLabel(Cursor $cursor): bool
153 $cursor->advanceToNextNonSpaceOrTab();
155 $partialLabel = LinkParserHelper::parsePartialLinkLabel($cursor);
163 if ($cursor->isAtEnd()) {
170 if ($cursor->getCurrentCharacter() !== ']') {
174 $cursor->advance();
177 if ($cursor->getCurrentCharacter() !== ':') {
181 $cursor->advance();
193 $cursor->advanceToNextNonSpaceOrTab();
200 private function parseDestination(Cursor $cursor): bool
202 $cursor->advanceToNextNonSpaceOrTab();
204 $destination = LinkParserHelper::parseLinkDestination($cursor);
211 $advanced = $cursor->advanceToNextNonSpaceOrTab();
212 if ($cursor->isAtEnd()) {
227 private function parseStartTitle(Cursor $cursor): bool
229 $cursor->advanceToNextNonSpaceOrTab();
230 if ($cursor->isAtEnd()) {
237 switch ($c = $cursor->getCurrentCharacter()) {
252 $cursor->advance();
253 if ($cursor->isAtEnd()) {
265 private function parseTitle(Cursor $cursor): bool
268 $title = LinkParserHelper::parsePartialLinkTitle($cursor, $this->titleDelimiter);
285 if (! $endDelimiterFound && $cursor->isAtEnd()) {
293 $cursor->advanceToNextNonSpaceOrTab();
294 if (! $cursor->isAtEnd()) {