feat: migrate from OpView to DoubleLinkedList<Op*> + multiple

funciton arguments
This commit is contained in:
2026-01-06 16:39:51 +01:00
parent 806e20d9b1
commit 589586db51
10 changed files with 136 additions and 89 deletions

View File

@@ -8,12 +8,16 @@ struct ListNode
T value;
ListNode* prev = nullptr;
ListNode* next = nullptr;
public:
T& get() noexcept { return value; }
const T& get() const noexcept { return value; }
};
template<typename T>
class DoubleLinkedList {
public:
DoubleLinkedList() = default;
~DoubleLinkedList() = default;
public:
static DoubleLinkedList<T> FromView(const View<T> &view)
@@ -26,7 +30,6 @@ public:
return list;
}
public:
View<T> ToView()
{
Builder<T> b;
@@ -37,6 +40,9 @@ public:
return b.view();
}
public:
ListNode<T>* New(T value) const { return new ListNode<T>(value); }
public:
void Append(ListNode<T>* node)
{