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

Method expect_kw

nodedb-sql/src/parser/array_stmt/parse_impl.rs:43–51  ·  view source on GitHub ↗
(&mut self, kw: &str)

Source from the content-addressed store, hash-verified

41 }
42
43 pub(super) fn expect_kw(&mut self, kw: &str) -> Result<()> {
44 match self.peek() {
45 Some(Tok::Ident(s)) if s.eq_ignore_ascii_case(kw) => {
46 self.i += 1;
47 Ok(())
48 }
49 other => Err(self.err(format!("expected keyword `{kw}`, got {other:?}"))),
50 }
51 }
52
53 pub(super) fn match_kw(&mut self, kw: &str) -> bool {
54 match self.peek() {

Callers 7

parse_createMethod · 0.80
parse_attrMethod · 0.80
parse_dropMethod · 0.80
parse_insertMethod · 0.80
parse_alterMethod · 0.80
parse_deleteMethod · 0.80

Calls 2

peekMethod · 0.45
errMethod · 0.45

Tested by

no test coverage detected