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

Function float_literal

graphlite/src/ast/parser.rs:2557–2566  ·  view source on GitHub ↗

Parse float literal

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2555
2556/// Parse float literal
2557fn float_literal(tokens: &[Token]) -> IResult<&[Token], f64> {
2558 if let Some(Token::Float(f)) = tokens.first() {
2559 Ok((&tokens[1..], *f))
2560 } else {
2561 Err(nom::Err::Error(nom::error::Error::new(
2562 tokens,
2563 nom::error::ErrorKind::Tag,
2564 )))
2565 }
2566}
2567
2568/// Parse boolean literal
2569fn boolean_literal(tokens: &[Token]) -> IResult<&[Token], bool> {

Callers

nothing calls this directly

Calls 2

ErrorEnum · 0.85
firstMethod · 0.45

Tested by

no test coverage detected