skif-js-syntax 0.1.1

oxc-based JS/TS module facts and static config extraction for skif; never executes code.
Documentation
//! Errors returned by this crate.

use skif_core::Span;

/// Why a file could not be turned into a [`crate::ModuleInfo`].
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum SyntaxError {
    /// The parser reported a syntax error.
    #[error("{message} at {}:{}", .span.start_line, .span.start_col)]
    Parse {
        /// First error message.
        message: String,
        /// Location of the first error.
        span: Span,
    },
    /// The file extension is not a supported script or component type.
    #[error("unsupported file type: {extension}")]
    Unsupported {
        /// The extension (without dot), empty if none.
        extension: String,
    },
}