janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.45k stars 223 forks source link

Update and ascii-sort string escapes in peg #1216

Closed sogaiu closed 1 year ago

sogaiu commented 1 year ago

Some escape sequences were added to Janet in d6337e77. This PR is an attempt to update the PEG for Janet in test/suite-peg.janet.

As the number of items is increasing, it seemed prudent to sort the items to make maintenance easier (e.g. avoidance of duplicates, locating a particular item, etc.). The sorting order chosen was based on what was found via the ascii(7) man page.

In an attempt to reduce the amount of "backslashing", also changed the string delimiter to backtick.