Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
vwkd committed Oct 25, 2023
1 parent 6222755 commit 8075f6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/arithmetic/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn term(i: &mut &str) -> PResult<i64> {
.parse_next(i)
}

// We transform an integer string into a i64, ignoring surrounding whitespaces
// We transform an integer string into a i64, ignoring surrounding whitespace
// We look for a digit suite, and try to convert it.
// If either str::from_utf8 or FromStr::from_str fail,
// we fallback to the parens parser defined above
Expand All @@ -63,7 +63,7 @@ fn factor(i: &mut &str) -> PResult<i64> {
.parse_next(i)
}

// We parse any expr surrounded by parens, ignoring all whitespaces around those
// We parse any expr surrounded by parens, ignoring all whitespace around those
fn parens(i: &mut &str) -> PResult<i64> {
delimited('(', expr, ')').parse_next(i)
}
Expand Down

0 comments on commit 8075f6d

Please sign in to comment.