solar_parse/
lib.rs

1#![doc = include_str!("../README.md")]
2#![doc(
3    html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/solar/main/assets/logo.png",
4    html_favicon_url = "https://raw.githubusercontent.com/paradigmxyz/solar/main/assets/favicon.ico"
5)]
6#![cfg_attr(docsrs, feature(doc_cfg))]
7
8// Feature flag.
9use ruint as _;
10
11#[macro_use]
12extern crate tracing;
13
14use solar_interface::diagnostics::{DiagBuilder, ErrorGuaranteed};
15
16pub mod lexer;
17pub use lexer::{Cursor, Lexer, unescape};
18
19mod parser;
20pub use parser::{Parser, Recovered};
21
22// Convenience re-exports.
23pub use bumpalo;
24pub use solar_ast::{self as ast, token};
25pub use solar_interface as interface;
26
27/// Parser error type.
28pub type PErr<'a> = DiagBuilder<'a, ErrorGuaranteed>;
29
30/// Parser result type. This is a shorthand for `Result<T, PErr<'a>>`.
31pub type PResult<'a, T> = Result<T, PErr<'a>>;