MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / parse_int

Function parse_int

smallthinker/src/llama-grammar.cpp:148–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148static const char * parse_int(const char * src) {
149 const char * pos = src;
150 while (is_digit_char(*pos)) {
151 pos++;
152 }
153 if (pos == src) {
154 throw std::runtime_error(std::string("expecting integer at ") + src);
155 }
156 return pos;
157}
158
159static std::pair<uint32_t, const char *> parse_char(const char * src) {
160 if (*src == '\\') {

Callers 1

parse_sequenceMethod · 0.85

Calls 2

is_digit_charFunction · 0.85
stringClass · 0.50

Tested by

no test coverage detected