001package gudusoft.gsqlparser.pp2;
002
003/**
004 * Overall outcome of a pp2 format call. Surfaced on
005 * {@link Pp2FormatResult#getStatus()}.
006 *
007 * <ul>
008 *   <li>{@link #OK} — every region rendered via the guarded AST path
009 *       (no recovery, no fallback). All diagnostics, if any, are at
010 *       {@link FormatDiagnostic.Severity#INFO} level.</li>
011 *   <li>{@link #OK_WITH_RECOVERY} — output is complete and every solid
012 *       input token is present, but at least one region took the
013 *       conservative or lexical-island fallback. Diagnostics carry the
014 *       per-region parser errors.</li>
015 *   <li>{@link #FAILED} — pp2 could not produce a usable output for at
016 *       least one region. This status is reserved for genuinely
017 *       unrecoverable conditions (e.g., an internal invariant violation);
018 *       it should never appear for ordinary malformed SQL.</li>
019 * </ul>
020 */
021public enum FormatStatus {
022    OK,
023    OK_WITH_RECOVERY,
024    FAILED
025}