bugfix in buffer object. Didn't increase the refcount when slicing

This commit is contained in:
Francesco Cozzuto
2023-01-12 16:11:53 +01:00
parent a56a302fd0
commit 189bfa030b
14 changed files with 117 additions and 315 deletions
+4 -14
View File
@@ -1,15 +1,11 @@
fun dummy() {}
Func = type(dummy)
| type(print);
Scanner = {
src: String,
i: int,
hint: Func,
current: Func,
consume: Func,
consumeSpaces: Func
hint: Callable,
current: Callable,
consume: Callable,
consumeSpaces: Callable
};
fun hint(scan: Scanner, n: int = 1) {
@@ -60,9 +56,3 @@ fun isSpace(c: String)
return c == ' '
or c == '\t'
or c == '\n';
fun min(x, y) {
if x < y:
return x;
return y;
}