MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_coord_literal

Method parse_coord_literal

nodedb-sql/src/parser/array_stmt/parse_impl.rs:359–366  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

357 }
358
359 fn parse_coord_literal(&mut self) -> Result<ArrayCoordLiteral> {
360 match self.bump().map(|t| &t.tok) {
361 Some(Tok::Int(n)) => Ok(ArrayCoordLiteral::Int64(*n)),
362 Some(Tok::Float(f)) => Ok(ArrayCoordLiteral::Float64(*f)),
363 Some(Tok::Str(s)) => Ok(ArrayCoordLiteral::String(s.clone())),
364 other => Err(self.err(format!("expected coord literal, got {other:?}"))),
365 }
366 }
367
368 fn parse_attr_literal(&mut self) -> Result<ArrayAttrLiteral> {
369 match self.bump().map(|t| &t.tok) {

Callers 2

parse_insertMethod · 0.80
parse_deleteMethod · 0.80

Calls 3

bumpMethod · 0.45
cloneMethod · 0.45
errMethod · 0.45

Tested by

no test coverage detected