Methods |
public
|
__construct(list<array{string, int, int}> $tokens, int $index = 0)
|
#
|
public
|
getTokens(): list<array{string, int, int}>
|
#
|
public
|
getContentBetween(int $startPos, int $endPos): string
|
#
|
public
|
getTokenCount(): int
|
#
|
public
|
currentTokenValue(): string
|
#
|
public
|
currentTokenType(): int
|
#
|
public
|
currentTokenOffset(): int
|
#
|
public
|
currentTokenLine(): int
|
#
|
public
|
currentTokenIndex(): int
|
#
|
public
|
endIndexOfLastRelevantToken(): int
|
#
|
public
|
isCurrentTokenValue(string $tokenValue): bool
|
#
|
public
|
isCurrentTokenType(int ...$tokenType): bool
|
#
|
public
|
isPrecededByHorizontalWhitespace(): bool
|
#
|
public
|
consumeTokenType(int $tokenType): void
|
#
|
public
|
consumeTokenValue(int $tokenType, string $tokenValue): void
|
#
|
public
|
tryConsumeTokenValue(string $tokenValue): bool
|
#
|
public
|
tryConsumeTokenType(int $tokenType): bool
|
#
|
public
|
getSkippedHorizontalWhiteSpaceIfAny(): string
|
#
|
public
|
joinUntil(int ...$tokenType): string
|
#
|
public
|
next(): void
|
#
|
public
|
addEndOfLineToSkippedTokens(): void
|
#
|
public
|
removeEndOfLineFromSkippedTokens(): void
|
#
|
public
|
forwardToTheEnd(): void
|
#
|
public
|
pushSavePoint(): void
|
#
|
public
|
dropSavePoint(): void
|
#
|
public
|
rollback(): void
|
#
|
public
|
hasTokenImmediatelyBefore(int $pos, int $expectedTokenType): bool
Check whether the position is directly preceded by a certain token type.
Check whether the position is directly preceded by a certain token type.
During this check TOKEN_HORIZONTAL_WS and TOKEN_PHPDOC_EOL are skipped
|
#
|
public
|
hasTokenImmediatelyAfter(int $pos, int $expectedTokenType): bool
Check whether the position is directly followed by a certain token type.
Check whether the position is directly followed by a certain token type.
During this check TOKEN_HORIZONTAL_WS and TOKEN_PHPDOC_EOL are skipped
|
#
|
public
|
getDetectedNewline(): ?string
|
#
|
public
|
hasParentheses(int $startPos, int $endPos): bool
Whether the given position is immediately surrounded by parenthesis.
Whether the given position is immediately surrounded by parenthesis.
|
#
|