MCPcopy Create free account
hub / github.com/acl-dev/acl / next_token

Method next_token

lib_acl_cpp/src/serialize/gsoner.cpp:396–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396std::string gsoner::next_token(std::string delimiters)
397{
398 std::string token;
399 skip_space_comment();
400
401 while (delimiters.find(codes_[pos_]) == std::string::npos) {
402 if (codes_[pos_] == '/') {
403check_again:
404 skip_space();
405 if(codes_[pos_] == '/') {
406 if(!check_comment()) {
407 throw syntax_error();
408 }
409 goto check_again;
410 }
411
412 if(token.size()) {
413 return token;
414 }
415 }
416
417 token.push_back(codes_[pos_]);
418 pos_++;
419 }
420
421 skip_space_comment();
422
423 return token;
424}
425
426std::string gsoner::get_namespace(void)
427{

Callers

nothing calls this directly

Calls 4

syntax_errorClass · 0.85
findMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected