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

Function let_statement

graphlite/src/ast/parser.rs:760–773  ·  view source on GitHub ↗

Parse LET statement: LET variable = expression [, variable = expression]

(tokens: &[Token])

Source from the content-addressed store, hash-verified

758
759/// Parse LET statement: LET variable = expression [, variable = expression]*
760fn let_statement(tokens: &[Token]) -> IResult<&[Token], Query> {
761 preceded(
762 tag_token(Token::Let),
763 map(
764 separated_list1(tag_token(Token::Comma), variable_definition),
765 |variable_definitions| {
766 Query::Let(LetStatement {
767 variable_definitions,
768 location: Location::default(),
769 })
770 },
771 ),
772 )(tokens)
773}
774
775/// Parse variable definition: variable = expression
776fn variable_definition(tokens: &[Token]) -> IResult<&[Token], VariableDefinition> {

Callers

nothing calls this directly

Calls 1

tag_tokenFunction · 0.70

Tested by

no test coverage detected