diff --git a/src/backend/vm.nim b/src/backend/vm.nim index 531668c..99a5fee 100644 --- a/src/backend/vm.nim +++ b/src/backend/vm.nim @@ -263,12 +263,11 @@ proc constReadUInt8(self: PeonVM, idx: int): PeonObject = result = PeonObject(kind: UInt8, uTiny: self.chunk.consts[idx]) -proc constReadString(self: PeonVM, idx: int): PeonObject = +proc constReadString(self: PeonVM, size: int, idx: int): PeonObject = ## Reads a constant from the ## chunk's constant table and ## returns a Peon object. Assumes ## the constant is a string - let size = self.readLong() result = PeonObject(kind: String, str: self.chunk.consts[idx..`(a, b: int): bool {return b < a;} + + +3 > 2; +2 < 3;