final class UnknownDirectiveReader
    implements BisonDirectiveReader
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Reads any directive no other reader knows.

Consumes arguments through the declaration boundary and preserves their source text in an unknown-declaration node. Later stages can retain directives without interpreting their semantics.

Methods§

public function handles(string $directive): bool

Reports that this reader accepts every directive.

Parameters

$directivestringDirective name including its percent sign

Returns

bool Always true, which is why this reader is consulted last
Test cases 1
public function read(BisonTokenStream $stream, string $directive): BisonDeclaration

Consumes the arguments as text up to the end of the declaration.

Parameters

$streamBisonTokenStreamStream positioned just after the directive name
$directivestringDirective name including its percent sign

Returns

BisonDeclaration The directive and the text that followed it
Test cases 3
Calls 5

Private surface 1§

Implementation details, listed for orientation only.

private BisonDeclarationBoundary $boundary

Test cases 7§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4
Other tests reaching this symbol 3

Relations§

Instantiated in 1