001package gudusoft.gsqlparser.ir.semantic; 002 003/** 004 * Stable, vendor-neutral classification of a semantic-IR diagnostic. 005 * 006 * <p>The category answers which layer owns the problem. It is deliberately 007 * orthogonal to {@link Severity}: for example, an unsupported lowering may be 008 * represented by an ERROR in strict mode while a recovery API retains a 009 * partial program alongside that same ERROR. 010 * 011 * <p><b>API status: supported discriminator.</b> New values may be added; 012 * consumer switches should retain a default branch. 013 */ 014public enum DiagnosticCategory { 015 /** The token stream or parsed grammar is not syntactically valid. */ 016 SYNTAX_ERROR, 017 018 /** The selected SQL dialect rejects an otherwise parsed construct. */ 019 DIALECT_SEMANTIC_ERROR, 020 021 /** The SQL may be valid, but Semantic IR cannot represent it yet. */ 022 LOWERING_UNSUPPORTED, 023 024 /** Analysis continued while explicitly omitting or approximating facts. */ 025 ANALYSIS_DEGRADED, 026 027 /** Non-fatal information about a valid analysis result. */ 028 ADVISORY 029}