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

Function literal

graphlite/src/ast/parser.rs:2463–2472  ·  view source on GitHub ↗

Parse literals

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2461
2462/// Parse literals
2463fn literal(tokens: &[Token]) -> IResult<&[Token], Literal> {
2464 alt((
2465 map(string_literal, Literal::String),
2466 map(integer_literal, Literal::Integer),
2467 map(float_literal, Literal::Float),
2468 map(boolean_literal, Literal::Boolean),
2469 map(null_literal, |_| Literal::Null),
2470 map(vector_literal, Literal::Vector),
2471 ))(tokens)
2472}
2473
2474/// Parse identifier or quoted identifier (ISO GQL compliant)
2475/// Accepts regular identifiers, backtick-delimited identifiers, and keywords as identifiers

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected