srhickma / padd

Fast and Automatic Formatting of Context-Free Languages
Apache License 2.0
2 stars 2 forks source link

Better pattern character escaping #207

Closed srhickma closed 4 years ago

srhickma commented 4 years ago

All pattern string escapes are replaced at once (during pattern generation) with the initial replacement during specification generation removed. As a result, non-whitespace characters can be escaped using only a single backslash. So the following pattern \\{\n{}\\} can be rewritten as \{\n{}\}.