-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Status
Next up is the actual implementation of the templates. For now they are ignored, but parsed properly.
Checklist
- Parsing class and function templates
- Basic templates implementations in the VM
- Template type deduction
- Template type constraints
Syntax preview:
Functions:
template <N: Uint64>
func replace(self: Ref< StaticArray<Char, N> >, from: Char, to: Char)
{
for (c: Ref of self) {
if (c == from) c = to;
}
}Classes:
template <T: ContiguousRange>
class Span
{
construct(range: Ref<T>) {
self.data = T.data();
self.size = T.size();
}
// ...
}Reactions are currently unavailable