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

Function ws

libs/@local/hashql/syntax-jexpr/src/parser/string/combinator.rs:116–128  ·  view source on GitHub ↗

A combinator that takes a parser `inner` and produces a parser that also consumes both leading and trailing whitespace, returning the output of `inner`.

(
    parser: ParseNext,
)

Source from the content-addressed store, hash-verified

114/// A combinator that takes a parser `inner` and produces a parser that also consumes both
115/// leading and trailing whitespace, returning the output of `inner`.
116pub(crate) fn ws<Input, Output, Error, ParseNext>(
117 parser: ParseNext,
118) -> impl Parser<Input, Output, Error>
119where
120 Input: StreamIsPartial + Stream<Token: AsChar + Clone>,
121 ParseNext: Parser<Input, Output, Error>,
122 Error: ParserError<Input>,
123{
124 trace(
125 "ws", //
126 delimited(multispace0, parser, multispace0),
127 )
128}

Callers 15

parse_path_segmentFunction · 0.85
parse_pathFunction · 0.85
parse_field_accessFunction · 0.85
parse_index_accessFunction · 0.85
parse_exprFunction · 0.85
parse_type_struct_fieldFunction · 0.85
parse_type_paren_structFunction · 0.85
parse_type_paren_tupleFunction · 0.85
parse_type_parenFunction · 0.85
parse_type_unionFunction · 0.85
parse_type_intersectionFunction · 0.85
parse_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected