Skip to content

Commit

Permalink
Removing commented-out code
Browse files Browse the repository at this point in the history
  • Loading branch information
kengorab committed Dec 10, 2024
1 parent f25c16a commit 9308d2f
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions projects/std/src/prelude.abra
Original file line number Diff line number Diff line change
Expand Up @@ -243,39 +243,6 @@ type CharsIterator {
}

self._decodeChar()
// if self._i >= self._numBytes return None

// val b1 = self._bytes.offset(self._i).load().asInt()
// self._i += 1
// if b1 < 128 return Some(Char.fromInt(b1))

// // Begin multi-byte cases, obtain first continuation byte
// if self._i >= self._numBytes unreachable("invalid utf-8 encoding: continuation byte expected given first byte ${b1.hex()}")
// val b2 = self._bytes.offset(self._i).load().asInt()
// self._i += 1

// // 3-byte case
// if b1 >= 0b11100000 {
// if self._i >= self._numBytes unreachable("invalid utf-8 encoding: continuation byte expected given first byte ${b1.hex()}")
// val b3 = self._bytes.offset(self._i).load().asInt()
// self._i += 1

// // 4-byte case
// if b1 >= 0b11110000 {
// if self._i >= self._numBytes unreachable("invalid utf-8 encoding: continuation byte expected given first byte ${b1.hex()}")
// val b4 = self._bytes.offset(self._i).load().asInt()
// self._i += 1

// val ch = ((b1 && 0b00000111) << 18) || ((b2 && 0b00111111) << 12) || ((b3 && 0b00111111) << 6) || (b4 && 0b00111111)
// return Some(Char.fromInt(ch))
// }

// val ch = ((b1 && 0b00001111) << 12) || ((b2 && 0b00111111) << 6) || (b3 && 0b00111111)
// return Some(Char.fromInt(ch))
// }

// val ch = ((b1 && 0b00011111) << 6) || (b2 && 0b00111111)
// Some(Char.fromInt(ch))
}

func _decodeChar(self): Char? {
Expand Down

0 comments on commit 9308d2f

Please sign in to comment.