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

Function yield_item

graphlite/src/ast/parser.rs:1134–1146  ·  view source on GitHub ↗

Parse YIELD item: column_name [AS alias]

(tokens: &[Token])

Source from the content-addressed store, hash-verified

1132
1133/// Parse YIELD item: column_name [AS alias]
1134fn yield_item(tokens: &[Token]) -> IResult<&[Token], YieldItem> {
1135 map(
1136 tuple((
1137 identifier,
1138 opt(tuple((expect_token(Token::As), identifier))),
1139 )),
1140 |(column_name, alias_opt)| YieldItem {
1141 column_name,
1142 alias: alias_opt.map(|(_, alias)| alias),
1143 location: Location::default(),
1144 },
1145 )(tokens)
1146}
1147
1148/// Parse MATCH clause
1149fn match_clause(tokens: &[Token]) -> IResult<&[Token], MatchClause> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected