final class Location
Public API: explicitly declared with @visibility public.

Where a node begins in the grammar file, as a line and column counted from one.

Reading a positiondoctest
$location = new \BisonParser\Ast\Location(12, 3);
    (string) $location // => '12:3'

Properties§

public int $line
public int $column

Methods§

public function __construct(public int $line, public int $column)

Parameters

$lineintLine number counted from one
$columnintByte column counted from one
public function __toString(): string

Writes the position as line:column.

Returns

string The position

Test cases 112§

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 111

Relations§

Instantiated in 1
Type declarations 68