Skip to content

Commit

Permalink
Fix peek2
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Oct 2, 2024
1 parent f403833 commit d0342b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/ast/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ pub struct ForBounds(

impl ForBounds {
/// Create a half-open range bounded inclusively below and exclusively above (`start..end`),
/// desugaring at `start..=end` into `start..end+1` if necessary.
/// desugaring `start..=end` into `start..end+1` if necessary.
///
/// Returns the `start` and `end` expressions.
pub(crate) fn into_half_open(self) -> (Expression, Expression) {
Expand Down Expand Up @@ -810,7 +810,7 @@ pub enum ForRange {
}

impl ForRange {
/// Create a half-open range, bounded inclusively below and exlusively above.
/// Create a half-open range, bounded inclusively below and exclusively above.
pub fn range(start: Expression, end: Expression) -> Self {
Self::Range(ForBounds(start, end, false))
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/lexer/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl<'a> Lexer<'a> {

/// Peeks at the character two positions ahead and returns true if it is equal to the char argument
fn peek2_char_is(&mut self, ch: char) -> bool {
self.peek_char() == Some(ch)
self.peek2_char() == Some(ch)
}

fn ampersand(&mut self) -> SpannedTokenResult {
Expand Down

0 comments on commit d0342b4

Please sign in to comment.