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

Function string_literal

graphlite/src/ast/parser.rs:2533–2542  ·  view source on GitHub ↗

Parse string literal

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2531
2532/// Parse string literal
2533fn string_literal(tokens: &[Token]) -> IResult<&[Token], String> {
2534 if let Some(Token::String(s)) = tokens.first() {
2535 Ok((&tokens[1..], s.clone()))
2536 } else {
2537 Err(nom::Err::Error(nom::error::Error::new(
2538 tokens,
2539 nom::error::ErrorKind::Tag,
2540 )))
2541 }
2542}
2543
2544/// Parse integer literal
2545fn integer_literal(tokens: &[Token]) -> IResult<&[Token], i64> {

Callers

nothing calls this directly

Calls 3

ErrorEnum · 0.85
cloneMethod · 0.80
firstMethod · 0.45

Tested by

no test coverage detected