classTokenClass
final class TokenClass
implements Declaration
Public API: explicitly declared with
@visibility public.%token_class name TOKEN|TOKEN... .: a nonterminal name standing for any of several terminals.
$file = (new \LemonParser\Parser())->parse("%token_class id ID|INDEXED.\n");
$class = $file->declarations()[0];
[$class->name->name, array_map(static fn ($symbol) => $symbol->name, $class->tokens)] // => ['id', ['ID', 'INDEXED']]Properties§
public Symbol $namepublic list<Symbol> $tokenspublic Location $locationMethods§
public function location(): LocationTest cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.