use std::path::Path;
use pest_derive::Parser;
mod collection;
pub mod context;
mod declarations;
mod legacy_header;
mod preprocessor;
mod protocol;
mod redaction;
mod request;
mod spans;
mod syntax;
mod variables;
pub use collection::parse_collection;
pub use collection::parse_collection_with_environment;
pub use syntax::{
SyntaxRequestSummary, SyntaxSummary, inspect_collection_syntax,
};
pub use variables::eval_shell_script;
#[derive(Parser)]
#[grammar = "src/parser/grammar.pest"]
struct CollectionParser;
pub fn preprocess_only(input: &str, working_dir: &Path) -> Result<String, String> {
preprocessor::preprocess(input, working_dir).map_err(|err| err.to_string())
}
#[cfg(test)]
mod tests;