| 1837 | /** BuildBack pops the last two elements off `constructed` and wraps them in the specified Fragment */ |
| 1838 | template<typename Key> |
| 1839 | void BuildBack(const MiniscriptContext script_ctx, Fragment nt, std::vector<Node<Key>>& constructed, const bool reverse = false) |
| 1840 | { |
| 1841 | Node<Key> child{std::move(constructed.back())}; |
| 1842 | constructed.pop_back(); |
| 1843 | if (reverse) { |
| 1844 | constructed.back() = Node<Key>{internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(child), std::move(constructed.back()))}; |
| 1845 | } else { |
| 1846 | constructed.back() = Node<Key>{internal::NoDupCheck{}, script_ctx, nt, Vector(std::move(constructed.back()), std::move(child))}; |
| 1847 | } |
| 1848 | } |
| 1849 | |
| 1850 | /** |
| 1851 | * Parse a miniscript from its textual descriptor form. |
no test coverage detected