MCPcopy Create free account
hub / github.com/hashintel/hash / finish

Method finish

libs/@local/hashql/syntax-jexpr/src/parser/state.rs:304–316  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

302 }
303
304 pub(crate) fn finish(mut self) -> Result<(), ParserDiagnostic> {
305 if let Some(token) = self.lexer.advance(&mut LexerContext {
306 spans: self.context.spans,
307 }) {
308 let token = token.change_category(ParserDiagnosticCategory::Lexer)?;
309
310 let span = self.insert_range(token.span);
311
312 return Err(expected_eof(span));
313 }
314
315 Ok(())
316 }
317
318 pub(crate) fn current_pointer(&self) -> jsonptr::PointerBuf {
319 self.context.current_pointer()

Callers 1

parse_exprMethod · 0.45

Calls 6

ErrInterface · 0.85
expected_eofFunction · 0.85
OkInterface · 0.85
change_categoryMethod · 0.80
advanceMethod · 0.45
insert_rangeMethod · 0.45

Tested by

no test coverage detected