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

Function at_location_statement

graphlite/src/ast/parser.rs:4530–4557  ·  view source on GitHub ↗

Parse AT location statement: AT location_path statements

(tokens: &[Token])

Source from the content-addressed store, hash-verified

4528
4529/// Parse AT location statement: AT location_path statements*
4530fn at_location_statement(tokens: &[Token]) -> IResult<&[Token], AtLocationStatement> {
4531 map(
4532 tuple((
4533 expect_token(Token::At),
4534 catalog_path,
4535 many1(map(
4536 tuple((
4537 alt((
4538 map(declare_statement, Statement::Declare),
4539 // NEXT statements removed - only allowed in procedure body context
4540 map(basic_query, Statement::Query),
4541 map(select_statement, Statement::Select),
4542 map(set_statement, |s| {
4543 Statement::DataStatement(DataStatement::Set(s))
4544 }),
4545 )),
4546 opt(expect_token(Token::Semicolon)),
4547 )),
4548 |(statement, _)| statement,
4549 )),
4550 )),
4551 |(_, location_path, statements)| AtLocationStatement {
4552 location_path,
4553 statements,
4554 location: Location::default(),
4555 },
4556 )(tokens)
4557}
4558
4559/// Parse transaction statement
4560fn transaction_statement(tokens: &[Token]) -> IResult<&[Token], TransactionStatement> {

Callers 1

parse_queryFunction · 0.85

Calls 2

expect_tokenFunction · 0.85
DataStatementEnum · 0.85

Tested by

no test coverage detected