001package gudusoft.gsqlparser.pp2.layout;
002
003/**
004 * Read-only view of a token's {@link LayoutDecision}. {@link LayoutContext}
005 * hands this out from {@code decisionAt(...)} so consumers (layout rules in
006 * {@code pp2.layout.rules}, the S31 output writer) can read decisions but cannot
007 * mutate them out of precedence — all writes must go through the context's
008 * priority-mediated {@code request*} methods.
009 *
010 * <p>Plan reference: §7.3/S23, §7.4/S23.
011 */
012public interface LayoutDecisionView {
013
014    /** Number of linebreaks to emit before the token, or {@link LayoutDecision#UNSET}. */
015    int getLinebreaksBefore();
016
017    /** Number of blank columns to emit before the token, or {@link LayoutDecision#UNSET}. */
018    int getBlanksBefore();
019
020    /** Indent level for the token's line, or {@link LayoutDecision#UNSET}. */
021    int getIndentLevel();
022
023    boolean isLinebreaksDecided();
024    boolean isBlanksDecided();
025    boolean isIndentDecided();
026
027    /** Text to emit instead of the token's source text, or {@code null} if undecided. */
028    String getTextOverride();
029    boolean isTextDecided();
030}