| 412 | } |
| 413 | |
| 414 | bool APISampleNWithTypes(TreeNode* t) { |
| 415 | // SAMPLE_N_WITH_TYPES |
| 416 | std::vector<TreeNode*> children = t->GetChildren(); |
| 417 | for (const std::string& v : children[0]->GetProp()->GetValues()) { |
| 418 | t->GetProp()->AddValue(v); |
| 419 | } |
| 420 | // SAMPLE_N_WITH_TYPES CONDITION |
| 421 | if (children.size() == 2 && children[1]->GetType() == "CONDITION") { |
| 422 | for (Prop* p : children[1]->GetProp()->GetNestingValues()) { |
| 423 | t->GetProp()->AddNestingValue(p); |
| 424 | } |
| 425 | } else if (children.size() == 2 && |
| 426 | children[1]->GetType() == "AS") { // SAMPLE_N_WITH_TYPES AS |
| 427 | t->SetOpAlias(children[1]->GetProp()->GetValues()[0]); |
| 428 | } else if (children.size() == 3) { // SAMPLE_N_WITH_TYPES CONDITION AS |
| 429 | for (Prop* p : children[1]->GetProp()->GetNestingValues()) { |
| 430 | t->GetProp()->AddNestingValue(p); |
| 431 | } |
| 432 | t->SetOpAlias(children[2]->GetProp()->GetValues()[0]); |
| 433 | } |
| 434 | return true; |
| 435 | } |
| 436 | |
| 437 | // NestingValues存放condition。第一个域是DNF,第二个域是PostProcess |
| 438 | // Values存放V附带的value |
nothing calls this directly
no test coverage detected