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

Method span

libs/@local/hashql/syntax-jexpr/src/parser/string/context.rs:30–39  ·  view source on GitHub ↗
(&mut self, range: Range<usize>)

Source from the content-addressed store, hash-verified

28
29impl Context<'_, '_> {
30 pub(crate) fn span(&mut self, range: Range<usize>) -> SpanId {
31 // `+ 1` here to offset the opening quote
32 self.spans.insert(
33 Span {
34 range: range_to_text(range),
35 pointer: None,
36 },
37 SpanAncestors::union(&[self.parent]),
38 )
39 }
40
41 pub(crate) fn cover(&mut self, span: SpanId, range: Range<usize>) {
42 self.spans.update(span, |span, _| {

Callers 15

parse_ident_lexicalFunction · 0.45
parse_ident_symbolFunction · 0.45
parse_ident_urlFunction · 0.45
parse_path_segmentFunction · 0.45
parse_pathFunction · 0.45
parse_field_accessFunction · 0.45
parse_index_accessFunction · 0.45
parse_expr_pathFunction · 0.45
parse_exprFunction · 0.45
parse_type_inferFunction · 0.45
parse_type_tuple_fieldFunction · 0.45
parse_type_struct_fieldFunction · 0.45

Calls 2

range_to_textFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected