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

Function parse_insertvalue

tools/alive_parser.cpp:1005–1020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1003}
1004
1005static unique_ptr<Instr> parse_insertvalue(string_view name) {
1006 auto &type = parse_type();
1007 auto &val = parse_operand(type);
1008 parse_comma();
1009 auto &elt_ty = parse_type();
1010 auto &elt = parse_operand(elt_ty);
1011 auto instr = make_unique<InsertValue>(type, string(name), val, elt);
1012
1013 while (true) {
1014 if (!tokenizer.consumeIf(COMMA))
1015 break;
1016 instr->addIdx((unsigned)parse_number());
1017 }
1018
1019 return instr;
1020}
1021
1022static ICmp::Cond parse_icmp_cond() {
1023 switch (auto t = *tokenizer) {

Callers 1

parse_instrFunction · 0.85

Calls 4

parse_commaFunction · 0.85
parse_numberFunction · 0.85
consumeIfMethod · 0.80
addIdxMethod · 0.80

Tested by

no test coverage detected