final class Layouts
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Reads the written spelling of a region of a parse tree.

Methods§

public function of(Node $node, string $trail = ''): Layout

Answers the layout of the tokens a node covers: their spellings and the trivia between them.

Parameters

$nodeNodeThe region
$trailstringThe trivia written after the region: the leading trivia of the next token, or the trailing trivia at the end of the input

Returns

Throws

InvariantViolation When the node covers no token
Called from 1
Calls 4

Relations§

Instantiated in 1
Method calls 1