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

Function parse_string_literal

graphlite/src/ast/parser.rs:5070–5079  ·  view source on GitHub ↗

Parse string literal

(tokens: &[Token])

Source from the content-addressed store, hash-verified

5068
5069/// Parse string literal
5070fn parse_string_literal(tokens: &[Token]) -> IResult<&[Token], String> {
5071 if let Some((Token::String(s), rest)) = tokens.split_first() {
5072 Ok((rest, s.clone()))
5073 } else {
5074 Err(nom::Err::Error(nom::error::Error::new(
5075 tokens,
5076 nom::error::ErrorKind::Tag,
5077 )))
5078 }
5079}
5080
5081/// Parse number (float)
5082fn parse_number(tokens: &[Token]) -> IResult<&[Token], f64> {

Callers

nothing calls this directly

Calls 2

ErrorEnum · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected