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

Function parse_ident

nodedb-sql/src/parser/object_literal.rs:81–93  ·  view source on GitHub ↗
(chars: &[char], pos: &mut usize)

Source from the content-addressed store, hash-verified

79}
80
81fn parse_ident(chars: &[char], pos: &mut usize) -> String {
82 let mut s = String::new();
83 while *pos < chars.len() {
84 let c = chars[*pos];
85 if c.is_ascii_alphanumeric() || c == '_' || c == '.' {
86 s.push(c);
87 *pos += 1;
88 } else {
89 break;
90 }
91 }
92 s
93}
94
95fn parse_string(chars: &[char], pos: &mut usize) -> Result<String, SqlError> {
96 // Expect opening single-quote

Callers 2

parse_objectFunction · 0.85
parse_valueFunction · 0.85

Calls 2

lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected