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

Host code between %{ and %}, kept exactly as written.

Reading a prologuedoctest
$file = (new \BisonParser\Parser())->parse("%{\n#include <stdio.h>\n%}\n%%\ns: 'a';\n");
    $file->declarations[0]->code // => "\n#include <stdio.h>\n"

Properties§

public string $code
public Location $location

Methods§

public function __construct(public string $code, public Location $location)

Parameters

$codestringText between the markers
$locationLocationWhere the opening marker is written
public function location(): Location

Answers where the declaration begins.

Returns

Location Line and column of the opening marker
Test cases 1

Test cases 8§

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 7

Relations§

Instantiated in 1
Constant reads 1