koka-lang / koka

Koka language compiler and interpreter
http://koka-lang.org
Other
3.16k stars 153 forks source link

fix slice advance function and test with regex #331

Closed TimWhiting closed 7 months ago

TimWhiting commented 1 year ago

While using regular expressions for parsing I ran into some really weird behavior. After quite a bit of debugging I found the issue in the standard library's advance function for slices. Here is the fix, along with a host of tests for both negative / positive advances.

daanx commented 7 months ago

Awesome!