| 655 | } |
| 656 | |
| 657 | instruction_ref module::get_parameter(std::string name) const |
| 658 | { |
| 659 | auto ins = std::find_if( |
| 660 | impl->instructions.begin(), impl->instructions.end(), [&](const instruction& x) { |
| 661 | if(x.name() == "@param") |
| 662 | { |
| 663 | return any_cast<builtin::param>(x.get_operator()).parameter == name; |
| 664 | } |
| 665 | else |
| 666 | { |
| 667 | return false; |
| 668 | } |
| 669 | }); |
| 670 | if(ins != this->end()) |
| 671 | return ins; |
| 672 | else |
| 673 | return this->end(); |
| 674 | } |
| 675 | |
| 676 | std::vector<instruction_ref> module::get_parameters() const |
| 677 | { |