MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / error

Method error

compiler/src/modules/parser/mod.rs:316–320  ·  view source on GitHub ↗

Diagnostic at next token + panic-mode sync to next statement boundary. */

(&mut self, msg: &str)

Source from the content-addressed store, hash-verified

314
315 /* Diagnostic at next token + panic-mode sync to next statement boundary. */
316 pub(super) fn error(&mut self, msg: &str) {
317 let n = self.source.len();
318 let (start, end) = self.tokens.peek().map(|t| (t.start, t.end)).unwrap_or((n, n));
319 self.error_at(start, end, msg);
320 }
321
322 /* Diagnostic at caller span + panic-mode sync; stops at statement boundary or bracket close. */
323 pub(super) fn error_at(&mut self, start: usize, end: usize, msg: &str) {

Callers 7

emitErrorFunction · 0.80
stmtMethod · 0.80
class_def_withMethod · 0.80
eatMethod · 0.80
try_stmtMethod · 0.80
expr_bpMethod · 0.80
parse_numberMethod · 0.80

Calls 3

error_atMethod · 0.80
lenMethod · 0.45
peekMethod · 0.45

Tested by

no test coverage detected