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

Function with_item

graphlite/src/ast/parser.rs:1461–1473  ·  view source on GitHub ↗

Parse WITH item: expression [AS alias]

(tokens: &[Token])

Source from the content-addressed store, hash-verified

1459
1460/// Parse WITH item: expression [AS alias]
1461fn with_item(tokens: &[Token]) -> IResult<&[Token], WithItem> {
1462 map(
1463 tuple((
1464 expression,
1465 opt(tuple((expect_token(Token::As), identifier))),
1466 )),
1467 |(expression, opt_alias)| WithItem {
1468 expression,
1469 alias: opt_alias.map(|(_, alias)| alias),
1470 location: Location::default(),
1471 },
1472 )(tokens)
1473}
1474
1475/// Parse ORDER BY clause: ORDER BY expr [ASC|DESC] [, expr [ASC|DESC]]*
1476fn order_clause(tokens: &[Token]) -> IResult<&[Token], OrderClause> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected