MCPcopy Create free account
hub / github.com/aspizu/goboscript / expect_no_eof

Method expect_no_eof

src/pre_processor.rs:103–111  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

101 }
102
103 fn expect_no_eof(&self) -> Result<(), Diagnostic> {
104 if *self.i >= self.tokens.len() {
105 return Err(Diagnostic {
106 kind: DiagnosticKind::UnrecognizedEof(vec![]),
107 span: get_span(&self.tokens[*self.i - 1]),
108 });
109 }
110 Ok(())
111 }
112
113 fn remove_token(&mut self, span: &mut Span) {
114 self.tokens.remove(*self.i);

Callers 5

parse_define_beginMethod · 0.80
parse_function_defineMethod · 0.80
parse_define_bodyMethod · 0.80
parse_undefMethod · 0.80

Calls 1

get_spanFunction · 0.85

Tested by

no test coverage detected