Skip to content

Commit

Permalink
docs: add panic info for parser
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeStanger committed Aug 30, 2023
1 parent b0bc2fe commit 35c60e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libcorn/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ impl<'a> CornParser<'a> {
/// Will fail if the input cannot be deserialized for any reaon.
///
/// Any of the above will return a specific error type with details.
///
/// # Panics
///
/// If the internal AST parser produces a tree in an invalid structure,
/// the function will panic.
/// This indicates a severe error in the library and should never occur.
pub fn parse(file: &str) -> Result<Value> {
let rules = AstParser::parse(Rule::config, file);

Expand Down

0 comments on commit 35c60e8

Please sign in to comment.