From 01d6580a17d5dc00b84cc3e72e0a86b090c1c6bd Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Fri, 14 Oct 2022 01:21:12 -0400 Subject: Start to fill out compile_statement more --- libtnsl/box/vector.tnsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libtnsl/box/vector.tnsl') diff --git a/libtnsl/box/vector.tnsl b/libtnsl/box/vector.tnsl index 724393f..85e6c3c 100644 --- a/libtnsl/box/vector.tnsl +++ b/libtnsl/box/vector.tnsl @@ -19,7 +19,7 @@ EXPRESS OR IMPLIED #/ -;struct Vector (type T) { +;struct Vector (raw type T) { uint length, dataSize, @@ -109,7 +109,7 @@ /; add (T item, uint index) /; if (index < 0 || index > self.length) - ;throw Error{"Bad Index"} + ;throw Error("Bad index", ERROR_CODE.OUT_OF_RANGE) ;/ # If it checks out then we check if we should grow @@ -122,7 +122,7 @@ ;self.data{i} = self.data{i - 1} ;/ - ;self{} = replace + ;self{index} = replace ;self.length += 1 ;/ -- cgit v1.2.3