MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / searched_when_branch

Function searched_when_branch

graphlite/src/ast/parser.rs:3899–3913  ·  view source on GitHub ↗

Parse WHEN branch for searched CASE: WHEN condition THEN result

(tokens: &[Token])

Source from the content-addressed store, hash-verified

3897
3898/// Parse WHEN branch for searched CASE: WHEN condition THEN result
3899fn searched_when_branch(tokens: &[Token]) -> IResult<&[Token], SearchedWhenBranch> {
3900 map(
3901 tuple((
3902 expect_token(Token::When),
3903 expression, // condition
3904 expect_token(Token::Then),
3905 expression, // result
3906 )),
3907 |(_, condition, _, then_expr)| SearchedWhenBranch {
3908 condition: Box::new(condition),
3909 then_expression: Box::new(then_expr),
3910 location: Location::default(),
3911 },
3912 )(tokens)
3913}
3914
3915/// Parse data modification statements (INSERT, MATCH INSERT, SET, REMOVE, DELETE)
3916fn data_statement(tokens: &[Token]) -> IResult<&[Token], DataStatement> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected