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

Method parse

libs/@local/hashql/syntax-jexpr/src/parser/object/dict.rs:37–48  ·  view source on GitHub ↗
(
        state: &mut ParserState<'heap, '_, '_>,
        key: &Key<'_>,
    )

Source from the content-addressed store, hash-verified

35
36impl<'heap> DictNode<'heap> {
37 pub(crate) fn parse(
38 state: &mut ParserState<'heap, '_, '_>,
39 key: &Key<'_>,
40 ) -> Result<Self, ParserDiagnostic> {
41 let expr = parse_dict(state)?;
42
43 Ok(Self {
44 key_span: key.span,
45 expr,
46 r#type: None,
47 })
48 }
49
50 pub(crate) fn with_type(mut self, r#type: TypeNode<'heap>) -> Self {
51 self.r#type = Some(r#type);

Callers 2

parse_from_stringFunction · 0.45
$nameFunction · 0.45

Calls 2

parse_dictFunction · 0.85
OkInterface · 0.85

Tested by 1

$nameFunction · 0.36