#![doc = include_str!("../README.md")]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/solar/main/assets/logo.png",
html_favicon_url = "https://raw.githubusercontent.com/paradigmxyz/solar/main/assets/favicon.ico"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(feature = "nightly", feature(panic_update_hook))]
#[macro_use]
extern crate tracing;
pub mod diagnostics;
use diagnostics::ErrorGuaranteed;
mod globals;
use globals::SessionGlobals;
mod pos;
pub use pos::{BytePos, CharPos, RelativeBytePos};
mod session;
pub use session::{Session, SessionBuilder};
pub mod source_map;
pub use source_map::SourceMap;
mod span;
pub use span::{Span, Spanned, SpannedOption};
mod symbol;
pub use symbol::{ByteSymbol, Ident, Symbol, kw, sym};
pub mod panic_hook;
pub use config::ColorChoice;
pub use dunce::canonicalize;
pub use solar_config as config;
pub use solar_data_structures as data_structures;
pub type Result<T = (), E = ErrorGuaranteed> = std::result::Result<T, E>;
pub const MIN_SOLIDITY_VERSION: semver::Version = semver::Version::new(0, 8, 0);
#[inline]
pub fn enter<R>(f: impl FnOnce() -> R) -> R {
SessionGlobals::with_or_default(|_| f())
}