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

Method parse

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

Source from the content-addressed store, hash-verified

29
30impl<'heap> ListNode<'heap> {
31 pub(crate) fn parse(
32 state: &mut ParserState<'heap, '_, '_>,
33 key: &Key<'_>,
34 ) -> Result<Self, ParserDiagnostic> {
35 let expr = parse_list(state)?;
36
37 Ok(Self {
38 key_span: key.span,
39 expr,
40 r#type: None,
41 })
42 }
43
44 pub(crate) fn with_type(mut self, r#type: TypeNode<'heap>) -> Self {
45 self.r#type = Some(r#type);

Callers

nothing calls this directly

Calls 2

parse_listFunction · 0.85
OkInterface · 0.85

Tested by

no test coverage detected