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

Function for_statement

graphlite/src/ast/parser.rs:788–808  ·  view source on GitHub ↗

Parse FOR statement: FOR [alias:] variable IN expression

(tokens: &[Token])

Source from the content-addressed store, hash-verified

786
787/// Parse FOR statement: FOR [alias:] variable IN expression
788fn for_statement(tokens: &[Token]) -> IResult<&[Token], Query> {
789 preceded(
790 tag_token(Token::For),
791 map(
792 tuple((
793 opt(terminated(identifier, tag_token(Token::Colon))),
794 identifier,
795 tag_token(Token::In),
796 expression,
797 )),
798 |(alias, variable, _, expr)| {
799 Query::For(ForStatement {
800 variable,
801 alias,
802 expression: expr,
803 location: Location::default(),
804 })
805 },
806 ),
807 )(tokens)
808}
809
810/// Parse FILTER statement: FILTER [WHERE] expression
811fn filter_statement(tokens: &[Token]) -> IResult<&[Token], Query> {

Callers

nothing calls this directly

Calls 1

tag_tokenFunction · 0.70

Tested by

no test coverage detected