interface Declaration
Public API: explicitly declared with @visibility public.

One %-directive or prologue block of a grammar file.

Every declaration knows where it was writtendoctest
$file = (new \BisonParser\Parser())->parse("%token A\n%%\ns: A;\n");
    (string) $file->declarations[0]->location() // => '1:1'

Methods§

public function location(): Location

Answers where the declaration begins.

Returns

Location Line and column of its first character

Test cases 4§

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 3

Relations§

Implemented by 14
Type checks 1
Type declarations 5