final class EmptyItem
    implements RhsItem
Public API: explicitly declared with @visibility public.

The %empty marker that documents an empty right-hand side.

Reading an empty alternativedoctest
$file = (new \BisonParser\Parser())->parse("%%\nopt: %empty | 'a' ;\n");
    $file->rules()[0]->alternatives[0]->items[0] instanceof \BisonParser\Ast\Rule\EmptyItem // => true

Properties§

public Location $location

Methods§

public function __construct(public Location $location)

Parameters

$locationLocationWhere the marker is written
public function location(): Location

Answers where the item begins.

Returns

Location Line and column of the marker
Test cases 2

Test cases 9§

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

Dedicated tests 1
Other tests reaching this symbol 8

Relations§

Instantiated in 1
Constant reads 1
Type checks 1