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

Function remove_item

graphlite/src/ast/parser.rs:4170–4186  ·  view source on GitHub ↗

Parse REMOVE item: property | variable:label | variable

(tokens: &[Token])

Source from the content-addressed store, hash-verified

4168
4169/// Parse REMOVE item: property | variable:label | variable
4170fn remove_item(tokens: &[Token]) -> IResult<&[Token], RemoveItem> {
4171 alt((
4172 // Property removal: object.property
4173 map(property_access_token, RemoveItem::Property),
4174 // Label removal: variable:label or variable IS label
4175 map(
4176 tuple((
4177 identifier,
4178 alt((expect_token(Token::Colon), expect_token(Token::Is))),
4179 label_expression,
4180 )),
4181 |(variable, _, labels)| RemoveItem::Label { variable, labels },
4182 ),
4183 // Variable removal: variable
4184 map(identifier, RemoveItem::Variable),
4185 ))(tokens)
4186}
4187
4188/// Parse DELETE statement: [DETACH | NODETACH] DELETE expression [, expression]*
4189fn delete_statement(tokens: &[Token]) -> IResult<&[Token], DeleteStatement> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected