TokenParser
Less than 1 minute
TokenParser
Base parser for token-based PHP declaration parsers.
class TokenParserProperties
namespace
public ParserNamespace $namespaceType: Hazaar\Parser\PHP\ParserNamespace
name
public string $nameType: string
file
public ParserFile $fileType: Hazaar\Parser\PHP\ParserFile
line
public int $lineType: int
docBlock
public DocBlock $docBlockType: Hazaar\Parser\DocBlock
fullName
public string $fullNameType: string
brief
public string $briefType: string
detail
public string $detailType: string
Methods
__construct
Creates a parser and optionally parses at the current token position.
public __construct(?array $tokens, ?ParserNamespace $namespace, ?ParserFile $file): voidParameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | |
$namespace | Hazaar\Parser\PHP\ParserNamespace | |
$file | Hazaar\Parser\PHP\ParserFile |
parse
Parses the symbol represented by the current token pointer.
protected parse(array $tokens): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | the token stream to parse |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:16 +0000