Provides operations on token streams, for use by pretty printer.
Methods | ||
---|---|---|
public
|
__construct(array $tokens)
|
# |
public
|
haveParens(int $startPos, int $endPos): bool
|
# |
public
|
haveBraces(int $startPos, int $endPos): bool
|
# |
public
|
haveTokenImmediatelyBefore(int $pos, int|string $expectedTokenType): bool
|
# |
public
|
haveTokenImmediatelyAfter(int $pos, int|string $expectedTokenType): bool
|
# |
public
|
skipLeft(int $pos, $skipTokenType)
|
# |
public
|
skipRight(int $pos, $skipTokenType)
|
# |
public
|
skipLeftWhitespace(int $pos): int
|
# |
public
|
skipRightWhitespace(int $pos): int
|
# |
public
|
findRight(int $pos, $findTokenType)
|
# |
public
|
haveTokenInRange(int $startPos, int $endPos, int|string $tokenType): bool
|
# |
public
|
haveBracesInRange(int $startPos, int $endPos)
|
# |
public
|
haveTagInRange(int $startPos, int $endPos): bool
|
# |
public
|
getIndentationBefore(int $pos): int
|
# |
public
|
getTokenCode(int $from, int $to, int $indent): string
|
# |