Skip to content

Commit

Permalink
Fix more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
afsalthaj committed Apr 1, 2024
1 parent 4aa9218 commit 4ab73fe
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 170 deletions.
17 changes: 0 additions & 17 deletions golem-worker-service-base/src/tokeniser/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,6 @@ impl TokenCursor {
self.next_token()
}

// State of cursor doesn't change similar to peek
pub fn next_non_empty_char_is(&mut self, token: Token) -> bool {
let mut index: usize = self.index;
let mut matches: bool = false;

while let Some(s) = self.tokens.get(index).map(|x| x.to_string()) {
if s.chars().all(char::is_whitespace) {
index += 1;
} else {
matches = s == token.to_string();
break;
}
}

matches
}

// Captures the string upto the end token, and advance the cursor further skipping the end token
pub fn capture_string_until_and_skip_end(
&mut self,
Expand Down
Loading

0 comments on commit 4ab73fe

Please sign in to comment.