final class ActionScanner
    implements BisonScanner
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Consumes a brace-delimited semantic action.

The body is host-language code, so the closing brace cannot be found by counting braces alone: a brace inside a comment or a string literal does not nest. This scanner therefore walks the body with the same comment and quote rules the lexer uses elsewhere, and only braces it meets outside those change the depth. An action left open by a truncated grammar ends at the end of the file rather than swallowing the parse.

Methods§

public function handles(string $character): bool

Reports whether an action can start here.

Parameters

$characterstringA single character; never the empty string

Returns

bool True for an opening brace
Test cases 1

Private surface 1§

Implementation details, listed for orientation only.

private BisonTrivia $trivia

Test cases 27§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 10
Other tests reaching this symbol 17

Relations§

Instantiated in 1