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

Method expect_int

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

Source from the content-addressed store, hash-verified

86 }
87
88 pub(super) fn expect_int(&mut self) -> Result<i64> {
89 match self.bump().map(|t| &t.tok) {
90 Some(Tok::Int(n)) => Ok(*n),
91 other => Err(self.err(format!("expected integer, got {other:?}"))),
92 }
93 }
94
95 pub(super) fn expect_float_or_int_as_f64(&mut self) -> Result<f64> {
96 match self.bump().map(|t| &t.tok) {

Callers 3

parse_createMethod · 0.80
parse_domain_boundMethod · 0.80
parse_alterMethod · 0.80

Calls 2

bumpMethod · 0.45
errMethod · 0.45

Tested by

no test coverage detected