public final class CaseModificationRules extends Object implements LayoutRule
GFmtOpt.caseKeywords, GFmtOpt.caseIdentifier, and
GFmtOpt.caseFuncname options.
This is a text rule, not a whitespace rule: it requests a per-token
render-time text override via LayoutContext.requestText. The wrapped
TSourceToken is never mutated.
ttkeyword → caseKeywords (default upper-case).ttidentifier immediately followed by ( → a function name
→ caseFuncname; otherwise an identifier → caseIdentifier.Quoted identifiers, string/numeric literals, comments, and punctuation are
never re-cased — only bare keywords and identifiers. Priority
LayoutPriorities.CASE_MODIFICATION (highest; text is orthogonal to
whitespace). Iterative; read-only over tokens.
Plan reference: §7.3/S29, §7.4/S29.
| Constructor and Description |
|---|
CaseModificationRules() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(LayoutContext context)
Apply the rule, requesting layout decisions on the context.
|
String |
name()
Short, stable identifier for logging/diagnostics.
|
int |
priority()
The rule's precedence.
|
public CaseModificationRules()
public int priority()
LayoutRulepriority in interface LayoutRulepublic String name()
LayoutRulename in interface LayoutRulepublic void apply(LayoutContext context)
LayoutRuleapply in interface LayoutRule