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

Function not_expression

graphlite/src/ast/parser.rs:1636–1650  ·  view source on GitHub ↗

Parse NOT expressions: [NOT] comparison

(tokens: &[Token])

Source from the content-addressed store, hash-verified

1634
1635/// Parse NOT expressions: [NOT] comparison
1636fn not_expression(tokens: &[Token]) -> IResult<&[Token], Expression> {
1637 alt((
1638 map(
1639 tuple((expect_token(Token::Not), comparison)),
1640 |(_, expr)| {
1641 Expression::Unary(UnaryExpression {
1642 operator: Operator::Not,
1643 expression: Box::new(expr),
1644 location: Location::default(),
1645 })
1646 },
1647 ),
1648 comparison,
1649 ))(tokens)
1650}
1651
1652/// Parse shorthand label predicate: identifier:label (e.g., n:Person)
1653fn shorthand_label_predicate(tokens: &[Token]) -> IResult<&[Token], Expression> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected