final class Wildcard
    implements Declaration
Public API: explicitly declared with @visibility public.

%wildcard TOKEN.: the terminal that matches any token the parser cannot otherwise use.

Reading the wildcarddoctest
$file = (new \LemonParser\Parser())->parse("%wildcard ANY.\n");
    $file->declarations()[0]->symbol?->name // => "ANY"

Properties§

public Symbol|null $symbol
public Location $location

Methods§

public function __construct(public Symbol|null $symbol, public Location $location)

Parameters

$symbolSymbol|nullThe terminal, or null when the declaration names none
$locationLocationWhere the `%` sign is
public function location(): Location

{@inheritDoc}

Returns

Test cases 1

Test cases 6§

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 5

Relations§

Instantiated in 1
Constant reads 1
Type checks 2