MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / parse_extractvalue

Function parse_extractvalue

tools/alive_parser.cpp:991–1003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989}
990
991static unique_ptr<Instr> parse_extractvalue(string_view name) {
992 auto &type = parse_type();
993 auto &val = parse_operand(type);
994 auto instr = make_unique<ExtractValue>(get_sym_type(), string(name), val);
995
996 while (true) {
997 if (!tokenizer.consumeIf(COMMA))
998 break;
999 instr->addIdx((unsigned)parse_number());
1000 }
1001
1002 return instr;
1003}
1004
1005static unique_ptr<Instr> parse_insertvalue(string_view name) {
1006 auto &type = parse_type();

Callers 1

parse_instrFunction · 0.85

Calls 3

parse_numberFunction · 0.85
consumeIfMethod · 0.80
addIdxMethod · 0.80

Tested by

no test coverage detected