MCPcopy Index your code
hub / github.com/GraphLite-AI/GraphLite / select_list

Function select_list

graphlite/src/ast/parser.rs:989–1004  ·  view source on GitHub ↗

Parse SELECT list: * | return_item (, return_item)

(tokens: &[Token])

Source from the content-addressed store, hash-verified

987
988/// Parse SELECT list: * | return_item (, return_item)*
989fn select_list(tokens: &[Token]) -> IResult<&[Token], SelectItems> {
990 alt((
991 // SELECT *
992 map(expect_token(Token::Star), |_| SelectItems::Wildcard {
993 location: Location::default(),
994 }),
995 // SELECT return_item (, return_item)*
996 map(
997 separated_list1(expect_token(Token::Comma), return_item),
998 |items| SelectItems::Explicit {
999 items,
1000 location: Location::default(),
1001 },
1002 ),
1003 ))(tokens)
1004}
1005
1006/// Parse FROM clause: FROM graph_expression [match_statement] (, graph_expression [match_statement])*
1007fn from_clause(tokens: &[Token]) -> IResult<&[Token], FromClause> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected