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

Method get_error_span

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

get the span of the blamed token

(&self)

Source from the content-addressed store, hash-verified

540 }
541 /// get the span of the blamed token
542 fn get_error_span(&self) -> Span {
543 if let Some(span) = self.last_span {
544 span
545 } else if let Some(token) = self.tokens.front() {
546 token.span()
547 } else if let Some(span) = self.source_span {
548 span
549 } else {
550 Span::call_site()
551 }
552 }
553 /// complain about expecting a token
554 fn error_expected(&self, what: &str) -> syn::Error {
555 syn::Error::new(self.get_error_span(), format!("expected {}", what))

Callers 3

error_expectedMethod · 0.80
error_unexpectedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected