classKeywords
final class Keywords
Restricted visibility: declared "@visibility SqlFormatter". Code outside that scope must not name this declaration.
Normalizes terminals according to supplied identifier and keyword declarations.
Methods§
public function __construct(
private list<string> $identifiers,
private list<string> $verbatim,
private array<string, string> $aliases,
private ?string $fallbackRule = null,
private list<string> $fallbackLiterals = [],
private ?string $excludedParent = null,
)Parameters
$identifiers | list<string> | Rules that own identifiers |
$verbatim | list<string> | Terminal kinds whose spelling must be preserved |
$aliases | array<string, string> | Canonical spellings by terminal kind |
$fallbackRule | ?string | |
$fallbackLiterals | list<string> | Literal kinds excluded from identifier fallback |
$excludedParent | ?string |
public function identifier(string $rule, ?Node $parent = null): boolPrivate surface 6§
Implementation details, listed for orientation only.
private list<string> $identifiersprivate list<string> $verbatimprivate array<string, string> $aliasesprivate ?string $fallbackRule = nullprivate list<string> $fallbackLiterals = []private ?string $excludedParent = nullTest cases 17§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
KeywordsTestcalls
Other tests reaching this symbol 16
DocumentTestcallsGroupingTestcallsReductionsTestcallsRendererTestcallsRulesTestcallsSettingsTest::testInjectedSeparatorPrecedesLexerProbingcallsShapeTestcallsSpacingTestcallsTriviaTestcallsVisitorTestcallsDialectTest::testCompactRulesCanProvideAnIndependentGrammarcallsFormatterTestcallsFormatterTestcallsDialectTestcallsDialectTestcallsDialectTestcalls
Relations§
Instantiated in 3
- new SqlFormatter\Platform\MySql\Dialect::compactRules() packages/sql-formatter/src/Platform/MySql/Dialect.php:47
- new SqlFormatter\Platform\PostgreSql\Dialect::compactRules() packages/sql-formatter/src/Platform/PostgreSql/Dialect.php:47
- new SqlFormatter\Platform\Sqlite\Dialect::compactRules() packages/sql-formatter/src/Platform/Sqlite/Dialect.php:47