Skip to main content

shrub_parser/parser/
winnow_str.rs

1//! String-based winnow parser
2
3use winnow::error::ContextError;
4
5use crate::ast;
6use crate::parser::{ParserOptions, SourceInfo};
7
8/// Type alias for parser error
9type PError = winnow::error::ErrMode<ContextError>;
10
11/// Parse a shell program from a string with full source location tracking
12///
13/// This is not yet implemented.
14///
15/// # Errors
16///
17/// No error is returned yet; see Panics.
18///
19/// # Panics
20///
21/// Always panics, because the winnow string parser is not yet implemented.
22pub fn parse_program(
23    _input: &str,
24    _options: &ParserOptions,
25    _source_info: &SourceInfo,
26) -> Result<ast::Program, PError> {
27    unimplemented!("winnow string parser is not yet implemented")
28}