classLexical
final class Lexical
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Joins output pieces into SQL text with a fixed, minimal spacing rule.
Pieces are separated by one space, except around punctuation that never merges with a neighbour, where a node asked for glue, and inside a spelled region, where the layout's trivia is written. The rule performs no formatting and no normalization of the pieces themselves.
Methods§
public function join(list<Piece> $pieces): stringJoins the pieces into text.
Parameters
$pieces | list<Piece> |
Returns
stringTest cases 14
LexicalTest::testJoinHonoursGlueAndWritesNothingForNoPiecescallsLexicalTest::testJoinSeparatesPiecesWithOneSpaceExceptAroundTightPunctuationcallsOutputTest::testLayoutRespellsEachRenderedPieceAndKeepsTheRenderedTextcallsOutputTest::testLayoutWritesItsTrailBeforeTheNextPiececallsNodeTest::testRenderOfAChildIsReachedThroughTheOutputcallsNodeTest::testRenderWritesTypedPiecesOnlycallsScriptTest::testRenderSeparatesTheMembersWithTerminatorscallsObjectNamesTest::testWriteWritesAnUnqualifiedNameAlonecallsObjectNamesTest::testWriteWritesTheSchemaBeforeTheNamecallsDeferrabilityTest::testRenderWritesEveryFormcallsMatchNameTest::testRenderWritesTheKeywordAndTheNamecallsReferenceActionTest::testRenderWritesAnInsertEventTheGrammarAcceptscallsReferenceActionTest::testRenderWritesTheEventAndTheReactioncallsTableOptionTest::testRenderWritesTheWordWithItsQuotingcalls
Called from 2
- method-call SqlSemantics\Platform\Sqlite\Model\Validation\Publication::establish() packages/sql-semantics-sqlite/src/Model/Validation/Publication.php:64
- method-call SqlSemantics\Platform\Sqlite\Model\Validation\Publication::establish() packages/sql-semantics-sqlite/src/Model/Validation/Publication.php:65
Calls 1
- method-call Lexical::tight() line 31
Decides whether two neighbouring pieces are written without a space.
Returns
boolTest cases 2
Called from 2
Calls 2
- class-const PieceKind::Symbol() line 49
- function-call
in_arrayline 49
Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 13
OutputTest::testLayoutRespellsEachRenderedPieceAndKeepsTheRenderedTextcallsOutputTest::testLayoutWritesItsTrailBeforeTheNextPiececallsPieceKindTest::testOnlyTheSymbolKindIsTightAgainstPunctuationcallsNodeTest::testRenderOfAChildIsReachedThroughTheOutputcallsNodeTest::testRenderWritesTypedPiecesOnlycallsScriptTest::testRenderSeparatesTheMembersWithTerminatorscallsObjectNamesTest::testWriteWritesAnUnqualifiedNameAlonecallsObjectNamesTest::testWriteWritesTheSchemaBeforeTheNamecallsDeferrabilityTest::testRenderWritesEveryFormcallsMatchNameTest::testRenderWritesTheKeywordAndTheNamecallsReferenceActionTest::testRenderWritesAnInsertEventTheGrammarAcceptscallsReferenceActionTest::testRenderWritesTheEventAndTheReactioncallsTableOptionTest::testRenderWritesTheWordWithItsQuotingcalls
Relations§
Instantiated in 3
- new SqlSemantics\Platform\Sqlite\Model\Validation\Publication::establish() packages/sql-semantics-sqlite/src/Model/Validation/Publication.php:64
- new SqlSemantics\Platform\Sqlite\Model\Validation\Publication::establish() packages/sql-semantics-sqlite/src/Model/Validation/Publication.php:65
- new SqlSemantics\Platform\Sqlite\Rendering\Canonical::layout() packages/sql-semantics-sqlite/src/Rendering/Canonical.php:44
Method calls 3
- method-call SqlSemantics\Platform\Sqlite\Model\Validation\Publication::establish() packages/sql-semantics-sqlite/src/Model/Validation/Publication.php:64
- method-call SqlSemantics\Platform\Sqlite\Model\Validation\Publication::establish() packages/sql-semantics-sqlite/src/Model/Validation/Publication.php:65
- method-call SqlSemantics\Platform\Sqlite\Rendering\Canonical::layout() packages/sql-semantics-sqlite/src/Rendering/Canonical.php:44