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

Function boolean_literal

graphlite/src/ast/parser.rs:2569–2578  ·  view source on GitHub ↗

Parse boolean literal

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2567
2568/// Parse boolean literal
2569fn boolean_literal(tokens: &[Token]) -> IResult<&[Token], bool> {
2570 if let Some(Token::Boolean(b)) = tokens.first() {
2571 Ok((&tokens[1..], *b))
2572 } else {
2573 Err(nom::Err::Error(nom::error::Error::new(
2574 tokens,
2575 nom::error::ErrorKind::Tag,
2576 )))
2577 }
2578}
2579
2580/// Parse null literal
2581fn null_literal(tokens: &[Token]) -> IResult<&[Token], ()> {

Callers

nothing calls this directly

Calls 2

ErrorEnum · 0.85
firstMethod · 0.45

Tested by

no test coverage detected