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

Method parse

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

parse_structFunction · 0.85
OkInterface · 0.85

Tested by

no test coverage detected