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

Function integer_literal

graphlite/src/ast/lexer.rs:1746–1750  ·  view source on GitHub ↗

Parse integer literals

(input: &str)

Source from the content-addressed store, hash-verified

1744
1745/// Parse integer literals
1746fn integer_literal(input: &str) -> IResult<&str, i64> {
1747 map(recognize(pair(opt(char('-')), digit1)), |s: &str| {
1748 s.parse::<i64>().unwrap()
1749 })(input)
1750}
1751
1752/// Parse float literals
1753fn float_literal(input: &str) -> IResult<&str, f64> {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.80

Tested by

no test coverage detected