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

Function parse_value

graphlite/src/ast/parser.rs:5058–5067  ·  view source on GitHub ↗

Parse value for index parameters

(tokens: &[Token])

Source from the content-addressed store, hash-verified

5056
5057/// Parse value for index parameters
5058fn parse_value(tokens: &[Token]) -> IResult<&[Token], Value> {
5059 alt((
5060 map(parse_string_literal, Value::String),
5061 map(parse_number, Value::Number),
5062 map(parse_integer, Value::Integer),
5063 map(expect_identifier("true"), |_| Value::Boolean(true)),
5064 map(expect_identifier("false"), |_| Value::Boolean(false)),
5065 map(expect_identifier("null"), |_| Value::Null),
5066 ))(tokens)
5067}
5068
5069/// Parse string literal
5070fn parse_string_literal(tokens: &[Token]) -> IResult<&[Token], String> {

Callers

nothing calls this directly

Calls 1

expect_identifierFunction · 0.85

Tested by

no test coverage detected