MCPcopy Create free account
hub / github.com/PLSysSec/wave / peek_operator_stream_offset

Method peek_operator_stream_offset

tools/fuzz-gen/src/specifications/preparser.rs:448–459  ·  view source on GitHub ↗

does the given stream contain this operator?

(&self, stream: &VecDeque<TokenTree>, operator: &str, offset: usize)

Source from the content-addressed store, hash-verified

446 }
447 /// does the given stream contain this operator?
448 fn peek_operator_stream_offset(&self, stream: &VecDeque<TokenTree>, operator: &str, offset: usize) -> bool {
449 for (i, c) in operator.char_indices() {
450 if let Some(TokenTree::Punct(punct)) = stream.get(i + offset) {
451 if punct.as_char() != c {
452 return false;
453 }
454 } else {
455 return false;
456 }
457 }
458 true
459 }
460 /// does the input start with this keyword?
461 fn peek_keyword(&self, keyword: &str) -> bool {
462 if let Some(TokenTree::Ident(ident)) = self.tokens.front() {

Callers 4

contains_operatorMethod · 0.80
contains_both_and_orMethod · 0.80
peek_operatorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected