insert sort, profile updates revamp

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-09 10:33:03 -07:00
parent 0ab1494b1e
commit 6ac4214be7
26 changed files with 250 additions and 95 deletions

View File

@@ -51,6 +51,10 @@ func parse_str(_ p: Parser, _ s: String) -> Bool {
}
func parse_char(_ p: Parser, _ c: Character) -> Bool {
if p.pos >= p.str.count {
return false
}
let ind = p.str.index(p.str.startIndex, offsetBy: p.pos)
if p.str[ind] == c {