classTokenDeclaration
final class TokenDeclaration
implements Declaration
Public API: explicitly declared with
@visibility public.%token TOKEN TOKEN... .: terminals named early to fix their numbering.
$file = (new \LemonParser\Parser())->parse("%token SEMI LP RP.\n");
array_map(static fn ($symbol) => $symbol->name, $file->declarations()[0]->symbols) // => ['SEMI', 'LP', 'RP']Properties§
public list<Symbol> $symbolspublic Location $locationMethods§
public function location(): Location{@inheritDoc}
Returns
Test cases 2
Test cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.