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

Function parse_string

libs/@local/hashql/syntax-jexpr/src/parser/string/mod.rs:80–94  ·  view source on GitHub ↗
(
    state: &mut ParserState<'heap, 'source, '_>,
    token: Token<'source>,
)

Source from the content-addressed store, hash-verified

78 fatal"
79)]
80pub(crate) fn parse_string<'heap, 'source>(
81 state: &mut ParserState<'heap, 'source, '_>,
82 token: Token<'source>,
83) -> Result<Expr<'heap>, StringDiagnostic> {
84 let TokenKind::String(value) = token.kind else {
85 panic!("Expected string token")
86 };
87
88 let id = state.insert_span(Span {
89 range: token.span,
90 pointer: Some(state.current_pointer()),
91 });
92
93 parse_expr_from_string(state, id, &value)
94}
95
96pub(crate) fn parse_type_from_string<'heap>(
97 state: &mut ParserState<'heap, '_, '_>,

Callers 1

parse_exprFunction · 0.50

Calls 3

parse_expr_from_stringFunction · 0.85
insert_spanMethod · 0.80
current_pointerMethod · 0.80

Tested by

no test coverage detected