MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / parse_args

Method parse_args

common/jinja/parser.cpp:468–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466 }
467
468 statements parse_args() {
469 // comma-separated arguments list
470 expect(token::open_paren, "Expected (");
471 statements args;
472 while (!is(token::close_paren)) {
473 statement_ptr arg;
474 // unpacking: *expr
475 if (peek().t == token::multiplicative_binary_operator && peek().value == "*") {
476 size_t start_pos = current;
477 ++current; // consume *
478 arg = mk_stmt<spread_expression>(start_pos, parse_expression());
479 } else {
480 arg = parse_expression();
481 if (is(token::equals)) {
482 // keyword argument
483 // e.g., func(x = 5, y = a or b)
484 size_t start_pos = current;
485 ++current; // consume equals
486 arg = mk_stmt<keyword_argument_expression>(start_pos, std::move(arg), parse_expression());
487 }
488 }
489 args.push_back(std::move(arg));
490 if (is(token::comma)) {
491 ++current; // consume comma
492 }
493 }
494 expect(token::close_paren, "Expected )");
495 return args;
496 }
497
498 statement_ptr parse_member_expression(statement_ptr object) {
499 size_t start_pos = current;

Callers 15

handle_argsFunction · 0.80
parse_argsFunction · 0.80
parse_argsFunction · 0.80
mainFunction · 0.80
llava_surgery.pyFile · 0.80
glmedge-surgery.pyFile · 0.80

Calls 1

push_backMethod · 0.45

Tested by 6

mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64