savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
155 stars 12 forks source link

Add `\U` 32-bit Unicode escape sequence for string literals. #383

Closed jemc closed 1 year ago

jemc commented 1 year ago

Prior to this commit, we only had the \u 16-bit escape sequence.

These two escape sequence forms are taken from C conventions.

This commit also adds the \' escape sequence for " strings and the \" escape sequence for \' strings, for consistency. This allows the user to switch from one string type to the other without needing to change their escape sequences, provided that both forms of quotes are already escaped.