| 389 | } |
| 390 | |
| 391 | bool APISampleNode(TreeNode* t) { |
| 392 | // SAMPLE_NODE |
| 393 | std::vector<TreeNode*> children = t->GetChildren(); |
| 394 | for (const std::string& v : children[0]->GetProp()->GetValues()) { |
| 395 | t->GetProp()->AddValue(v); |
| 396 | } |
| 397 | // SAMPLE_NODE CONDITION |
| 398 | if (children.size() == 2 && children[1]->GetType() == "CONDITION") { |
| 399 | for (Prop* p : children[1]->GetProp()->GetNestingValues()) { |
| 400 | t->GetProp()->AddNestingValue(p); |
| 401 | } |
| 402 | } else if (children.size() == 2 && |
| 403 | children[1]->GetType() == "AS") { // SAMPLE_NODE AS |
| 404 | t->SetOpAlias(children[1]->GetProp()->GetValues()[0]); |
| 405 | } else if (children.size() == 3) { // SAMPLE_NODE CONDITION AS |
| 406 | for (Prop* p : children[1]->GetProp()->GetNestingValues()) { |
| 407 | t->GetProp()->AddNestingValue(p); |
| 408 | } |
| 409 | t->SetOpAlias(children[2]->GetProp()->GetValues()[0]); |
| 410 | } |
| 411 | return true; |
| 412 | } |
| 413 | |
| 414 | bool APISampleNWithTypes(TreeNode* t) { |
| 415 | // SAMPLE_N_WITH_TYPES |
nothing calls this directly
no test coverage detected