Comment
in package
Table of Contents
Methods
- tokenizeString() : array<int, array<string, string|int|array<string|int, int>>>
- Splits a single doc block comment token up into something that can be easily iterated over.
- collectWhitespace() : array<string, string|int>|null
- Collect consecutive whitespace into a single token.
- processLine() : array<int, array<string, string|int>>
- Process a single line of a comment.
Methods
tokenizeString()
Splits a single doc block comment token up into something that can be easily iterated over.
public
tokenizeString(string $comment, string $eolChar, int $stackPtr) : array<int, array<string, string|int|array<string|int, int>>>
Parameters
- $comment : string
-
The doc block comment string to parse.
- $eolChar : string
-
The EOL character to use for splitting strings.
- $stackPtr : int
-
The position of the token in the "new"/final token stream.
Return values
array<int, array<string, string|int|array<string|int, int>>>collectWhitespace()
Collect consecutive whitespace into a single token.
private
collectWhitespace(string $comment, int $start, int $end) : array<string, string|int>|null
Parameters
- $comment : string
-
The comment string being tokenized.
- $start : int
-
The position in the string to start processing.
- $end : int
-
The position in the string to end processing.
Return values
array<string, string|int>|nullprocessLine()
Process a single line of a comment.
private
processLine(string $comment, string $eolChar, int $start, int $end) : array<int, array<string, string|int>>
Parameters
- $comment : string
-
The comment string being tokenized.
- $eolChar : string
-
The EOL character to use for splitting strings.
- $start : int
-
The position in the string to start processing.
- $end : int
-
The position in the string to end processing.